MethodBuilder.GetCustomAttributes MethodBuilder.GetCustomAttributes MethodBuilder.GetCustomAttributes MethodBuilder.GetCustomAttributes Method

定义

返回为此方法定义的自定义属性。Returns the custom attributes defined for this method.

重载

GetCustomAttributes(Boolean) GetCustomAttributes(Boolean) GetCustomAttributes(Boolean) GetCustomAttributes(Boolean)

返回为此方法定义的所有自定义属性。Returns all the custom attributes defined for this method.

GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean)

返回由给定类型标识的自定义属性。Returns the custom attributes identified by the given type.

GetCustomAttributes(Boolean) GetCustomAttributes(Boolean) GetCustomAttributes(Boolean) GetCustomAttributes(Boolean)

返回为此方法定义的所有自定义属性。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()

参数

inherit
Boolean Boolean Boolean Boolean

指定是否搜索此成员的继承链以查找自定义属性。Specifies whether to search this member's inheritance chain to find the custom attributes.

返回

Object[]

返回表示此方法的所有自定义特性的对象数组。Returns an array of objects representing all the custom attributes of this method.

异常

GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean)

返回由给定类型标识的自定义属性。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()

参数

attributeType
Type Type Type Type

自定义特性类型。The custom attribute type.

inherit
Boolean Boolean Boolean Boolean

指定是否搜索此成员的继承链以查找自定义属性。Specifies whether to search this member's inheritance chain to find the custom attributes.

返回

Object[]

返回一个对象数组,表示此方法的属性属于类型 attributeTypeReturns an array of objects representing the attributes of this method that are of type attributeType.

异常

适用于