post icon

CAST String to Enum

Per castare una stringa ad enum copia e incolla il seguente snippet:

MyEnum myEnumVariable = (MyEnum)Enum.Parse(typeof(MyEnum), "MyEnum_String_Value");
14 ottobre 2009 @ 13:55

No comments yet.

Leave a comment

Leave a Reply

Are you human? Time limit is exhausted. Please reload CAPTCHA.