Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

C# .net core convert string to enum

var foo = (YourEnum) Enum.Parse(typeof(YourEnum), yourString);
if (Enum.IsDefined(typeof(YourEnum), foo))
{
    return foo;
}
Source by www.csharp-examples.net #
 
PREVIOUS NEXT
Tagged: #core #convert #string #enum
ADD COMMENT
Topic
Name
1+3 =