Answers for "how to input enum type from value in c#"

C#
1

C# .net core convert string to enum

var foo = (YourEnum) Enum.Parse(typeof(YourEnum), yourString);
if (Enum.IsDefined(typeof(YourEnum), foo))
{
    return foo;
}
Posted by: Guest on April-27-2020

C# Answers by Framework

Browse Popular Code Answers by Language