//Option 1:
string m = Enum.GetName(typeof(MyEnumClass), value);
//Option 2:
string n = nameof(MyEnumClass.Value);
int value = GetValueFromDb();
var enumDisplayStatus = (EnumDisplayStatus)value;
string stringValue = enumDisplayStatus.ToString();
string[] nameList= System.Enum.GetNames(typeof(Word));
foreach (var name in nameList)
{
print(name);//获取名称
}
1
2
3
4
5