public static string ToDescriptionString(this Width val) { var attributes = (DescriptionAttribute[])val.GetType().GetField(val.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), false); return(attributes.Length > 0 ? attributes[0].Description : string.Empty); }
public override string ToString() { return(base.ToString() + Width + Width.GetType() + Height + Height.GetType()); }