Редагувати

Поділитися через


MethodBuilder.GetCustomAttributes Method

Definition

Returns the custom attributes defined for this method.

Overloads

GetCustomAttributes(Boolean)

Returns all the custom attributes defined for this method.

GetCustomAttributes(Type, Boolean)

Returns the custom attributes identified by the given type.

GetCustomAttributes(Boolean)

Source:
MethodBuilder.cs

Returns all the custom attributes defined for this method.

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 member's inheritance chain to find the custom attributes.

Returns

Object[]

Returns an array of objects representing all the custom attributes of this method.

Exceptions

Applies to

GetCustomAttributes(Type, Boolean)

Source:
MethodBuilder.cs

Returns the custom attributes identified by the given 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

The custom attribute type.

inherit
Boolean

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

Returns

Object[]

Returns an array of objects representing the attributes of this method that are of type attributeType.

Exceptions

Applies to