ComAwareEventInfo.GetCustomAttributes Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, returns all attributes that are applied to this member.
Overloads
GetCustomAttributes(Boolean) |
When overridden in a derived class, gets an array that contains all the custom attributes that are applied to this member. |
GetCustomAttributes(Type, Boolean) |
When overridden in a derived class, gets an array that contains all the custom attributes of the specified type that are applied to this member. |
GetCustomAttributes(Boolean)
- Source:
- ComAwareEventInfo.cs
- Source:
- ComAwareEventInfo.cs
- Source:
- ComAwareEventInfo.cs
When overridden in a derived class, gets an array that contains all the custom attributes that are applied to this member.
public:
override cli::array <System::Object ^> ^ GetCustomAttributes(bool inherit);
public override object[] GetCustomAttributes (bool inherit);
override this.GetCustomAttributes : bool -> obj[]
Public Overrides Function GetCustomAttributes (inherit As Boolean) As Object()
Parameters
- inherit
- Boolean
true
to search this member's inheritance chain to find the attributes; otherwise, false
.
Returns
An array that contains all the custom attributes, or an array that has no elements if no attributes were defined.
Exceptions
This member belongs to a type that is loaded into the reflection-only context. See How to: Load Assemblies into the Reflection-Only Context.
A custom attribute type cannot be loaded.
Remarks
This method calls the GetCustomAttributes method of the underlying EventInfo object.
See also
Applies to
GetCustomAttributes(Type, Boolean)
- Source:
- ComAwareEventInfo.cs
- Source:
- ComAwareEventInfo.cs
- Source:
- ComAwareEventInfo.cs
When overridden in a derived class, gets an array that contains all the custom attributes of the specified type that are applied to this member.
public:
override cli::array <System::Object ^> ^ GetCustomAttributes(Type ^ attributeType, bool inherit);
public override object[] GetCustomAttributes (Type attributeType, bool inherit);
override this.GetCustomAttributes : Type * bool -> obj[]
Public Overrides Function GetCustomAttributes (attributeType As Type, inherit As Boolean) As Object()
Parameters
- attributeType
- Type
The attribute type to search for. Only attributes that are assignable to this type can be returned.
- inherit
- Boolean
true
to search this member's inheritance chain to find the attributes; otherwise, false
.
Returns
An array that contains all the custom attributes of the specified type, or an array that has no elements if no attributes were defined.
Exceptions
attributeType
is null
.
This member belongs to a type that is loaded into the reflection-only context. See How to: Load Assemblies into the Reflection-Only Context
A custom attribute type cannot be loaded.