c# enum value in string code example
Example 1: c# string enum
public static class Status
{
public const string Awesome = "Awesome";
public const string Cool = "Cool";
}
//Not an enum but has a similar effect without needing to convert ints
Example 2: how to pass string value to enum in c#
MyEnum myEnum = (MyEnum)Enum.Parse(typeof(MyEnum), myString);