Rock.Reflection.GetDescription C# (CSharp) Méthode

GetDescription() public static méthode

Returns the Description Attribute value for a given type
public static GetDescription ( Type type ) : string
type System.Type
Résultat string
        public static string GetDescription( Type type )
        {
            foreach ( var descriptionAttribute in type.GetCustomAttributes( typeof( DescriptionAttribute ), true ) )
            {
                return ( (DescriptionAttribute)descriptionAttribute ).Description;
            }
            return null;
        }