Returns an array of custom attributes identified by Type.
[Visual Basic] Overloads MustOverride Public Function GetCustomAttributes( _ ByVal attributeType As Type _ ) As Object () [C#] public abstract object[] GetCustomAttributes( Type attributeType ); [C++] public: virtual Object* GetCustomAttributes( Type* attributeType ) [] = 0; [JScript] public abstract function GetCustomAttributes( attributeType : Type ) : Object[];
Value | Condition |
---|---|
An array of custom attributes | Attributes are defined on this reflected member. |
An empty array | No attributes are defined on this member. |
Exception Type | Condition |
---|---|
TypeLoadException | If the custom attribute type can not be loaded. |
The GetCustomAttributes method is an abstract method that will retrieve one or more attribute types that are defined by this member.
MemberInfo Class | MemberInfo Members | System.Reflection Namespace | MemberInfo.GetCustomAttributes Overload List