To answer your question "how can I get an integer for a string value":
To convert from a string to an enumeration and then convert the resulting enumeration to int, you can do this:
public enum Animals
{
dog = 0,
cat = 1,
rat = 2
}
...
Animals answer;
if (Enum.TryParse("CAT", true, out answer))
{
int value = (int) answer;
Console.WriteLine(value);
}
, , , ( ), , Animal, Animals.