Rock.Reflection.GetCategory C# (CSharp) Method

GetCategory() public static method

Returns the Category Attribute value for a given type
public static GetCategory ( Type type ) : string
type System.Type
return string
        public static string GetCategory( Type type )
        {
            foreach ( var categoryAttribute in type.GetCustomAttributes( typeof( CategoryAttribute ), true ) )
            {
                return ( (CategoryAttribute)categoryAttribute ).Category;
            }
            return null;
        }