C
cadilhac
Hi,
I have the following code:
public enum MyColors { Red, Green, Blue }
MyColors c = (MyColors)Enum.Parse(typeof(MyColors), "abcd");
Why do I get c = "abcd" after this code instead of getting a
ArgumentException ?
MSDN says that this expetion is triggered when value is a name, but not
one of the named constants defined for the enumeration.
Thank you
Herve
I have the following code:
public enum MyColors { Red, Green, Blue }
MyColors c = (MyColors)Enum.Parse(typeof(MyColors), "abcd");
Why do I get c = "abcd" after this code instead of getting a
ArgumentException ?
MSDN says that this expetion is triggered when value is a name, but not
one of the named constants defined for the enumeration.
Thank you
Herve