예제 #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));
 }