更新时间:2023-11-07 20:59:04
将其投射为枚举类型:
Cast it to the enum type:
MyEnum me = (MyEnum) myInteger;
然后只需使用ToString重写即可获取枚举值名称:
Then just use the ToString override to get the enum value name:
string s = me.ToString();
如何通过使用循环将值作为逗号分隔的值传递来获取枚举字符串值