how to input enum type from value in c# code example
Example 1: C# .net core convert string to enum
var foo = (YourEnum) Enum.Parse(typeof(YourEnum), yourString);
if (Enum.IsDefined(typeof(YourEnum), foo))
{
return foo;
}
Example 2: get enum value c#
int something = (int) Question.Role;