Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

How can I cast string to enum?

YourEnum foo = (YourEnum) Enum.Parse(typeof(YourEnum), yourString);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #I #cast #string
ADD COMMENT
Topic
Name
3+1 =