Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Get enum value from string or int

MyEnum myEnum = (MyEnum)myInt;

MyEnum myEnum = (MyEnum)Enum.Parse(typeof(MyEnum), myString);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Get #enum #string #int
ADD COMMENT
Topic
Name
5+1 =