public static string GetDescription( Type type ) { foreach ( var descriptionAttribute in type.GetCustomAttributes( typeof( DescriptionAttribute ), true ) ) { return ( (DescriptionAttribute)descriptionAttribute ).Description; } return null; }