示例#1
0
 public static string ToStatusMessage(GlobalEnum.StatusCode val)
 {
     DescriptionAttribute[] attributes = (DescriptionAttribute[])val.GetType().GetField(val.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), false);
     return(attributes.Length > 0 ? attributes[0].Description : string.Empty);
 }
示例#2
0
 public static int ToStatusCode(GlobalEnum.StatusCode val)
 {
     return((int)val);
 }