コード例 #1
0
 /// <summary>
 /// Gets the description attribute for the specified enumeration value
 /// </summary>
 public static DescriptionAttribute GetDescriptionForEnum(this Enum enumeration)
 {
     return(DescriptionAttribute.LoadDescription(enumeration.GetType().GetMember(enumeration.ToString())[0]));
 }
コード例 #2
0
 /// <summary>
 /// Gets the description attribute for the specified type
 /// </summary>
 public static DescriptionAttribute GetDescriptionForType(this Type type)
 {
     return(DescriptionAttribute.LoadDescription(type));
 }