Redigeeri

Jagamisviis:


TypeDelegator.GetCustomAttributes Method

Definition

Returns all the custom attributes defined for this type.

Overloads

GetCustomAttributes(Boolean)

Returns all the custom attributes defined for this type, specifying whether to search the type's inheritance chain.

GetCustomAttributes(Type, Boolean)

Returns an array of custom attributes identified by type.

GetCustomAttributes(Boolean)

Source:
TypeDelegator.cs
Source:
TypeDelegator.cs
Source:
TypeDelegator.cs

Returns all the custom attributes defined for this type, specifying whether to search the type's inheritance chain.

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

Specifies whether to search this type's inheritance chain to find the attributes.

Returns

Object[]

An array of objects containing all the custom attributes defined for this type.

Exceptions

A custom attribute type cannot be loaded.

Applies to

GetCustomAttributes(Type, Boolean)

Source:
TypeDelegator.cs
Source:
TypeDelegator.cs
Source:
TypeDelegator.cs

Returns an array of custom attributes identified by type.

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

An array of custom attributes identified by type.

inherit
Boolean

Specifies whether to search this type's inheritance chain to find the attributes.

Returns

Object[]

An array of objects containing the custom attributes defined in this type that match the attributeType parameter, specifying whether to search the type's inheritance chain, or null if no custom attributes are defined on this type.

Exceptions

attributeType is null.

A custom attribute type cannot be loaded.

Applies to