public static string GetEnumStr(object value, System.Type type) { int intValue = (int)value; EnumInfo ei = Get(type); if (ei.GetStr(intValue, out var name)) { return(name); } return(intValue.ToString()); }