Iterate Enum
foreach (string item in Enum.GetNames(typeof(MyEnum))){...}
Convert from string to Enum
MyEnum myEnum = (MyEnum)Enum.Parse(typeof(MyEnum), text);
foreach (string item in Enum.GetNames(typeof(MyEnum))){...}
Convert from string to Enum
MyEnum myEnum = (MyEnum)Enum.Parse(typeof(MyEnum), text);
Comments
Post a Comment