Returns an instance of each custom attribute defined on the given TypeDelegator that meet the Type criteria.
[Visual Basic] Overloads Overrides Public Function GetCustomAttributes( _ ByVal attributeType As Type _ ) As Object () [C#] public override object[] GetCustomAttributes( Type attributeType ); [C++] public: override Object* GetCustomAttributes( Type* attributeType ) []; [JScript] public override function GetCustomAttributes( attributeType : Type ) : Object[];
Returns an array of all the custom attributes of type attributeType defined on this TypeDelegator.
Exception Type | Condition |
---|---|
TypeLoadException | if the custom attribute type can not be loaded. |
Returns an empty array if non-custom attributes exists on this the given element. Ignores any attributes that don't inherit from Attribute. If a type is specified, the array returned must be an array of that type.
TypeDelegator Class | TypeDelegator Members | System.Reflection Namespace | TypeDelegator.GetCustomAttributes Overload List | Attribute