I have an enum defined as follow:
public enum MyEnumValue
{
A0, A1, A2, A3,
A4, A5, A6, A7,...
}
Now, I need to match a user selection string to one the value of the enum , "A1" or "A2", etc...
Unfortunately, I have not been able to find a way to match the string value of the "A1" as an example to my enum value MyEnumValue.A1 without an explicit switch statement.
Any idea how this could be done more elegantly will be highly appreciated.
Thanks in advance.