Is there a way to associate a string from a text file with an enum value?
The problem is: I have a few enum values stored as string in a text file which I read on the fly on meeting some condition… Now I want to assign the read value to an enum.
What is the most effective way to do so? It doesn’t need to be the simplest approach.
You can set up a map that you can use over and over: