Beispiel #1
0
 private static string GetDescription(Type t, object v)
 {
     try
     {
         FieldInfo field = t.GetField(OnLinePaymentEnumHelper.GetName(t, v));
         DescriptionAttribute[] array = (DescriptionAttribute[])field.GetCustomAttributes(typeof(DescriptionAttribute), false);
         return((array.Length != 0) ? array[0].Description : OnLinePaymentEnumHelper.GetName(t, v));
     }
     catch
     {
         return("未知");
     }
 }
Beispiel #2
0
 public static string GetOnLinePaymentDescription(object v)
 {
     return(OnLinePaymentEnumHelper.GetDescription(typeof(OnLinePayment), v));
 }