ModuleBuilder.GetCustomAttributes 方法

定义

返回应用于当前 ModuleBuilder属性的自定义属性。

重载

名称 说明
GetCustomAttributes(Boolean)

返回已应用于当前 ModuleBuilder的所有自定义属性。

GetCustomAttributes(Type, Boolean)

返回已应用于当前 ModuleBuilder且派生自指定属性类型的所有自定义属性。

GetCustomAttributes(Boolean)

Source:
ModuleBuilder.cs

返回已应用于当前 ModuleBuilder的所有自定义属性。

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

对于此类型的对象,忽略此参数。

返回

Object[]

包含自定义属性的数组;如果没有属性,则数组为空。

适用于

GetCustomAttributes(Type, Boolean)

Source:
ModuleBuilder.cs

返回已应用于当前 ModuleBuilder且派生自指定属性类型的所有自定义属性。

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

属性派生自的基类型。

inherit
Boolean

对于此类型的对象,忽略此参数。

返回

Object[]

一个数组,其中包含从任何级别 attributeType派生的自定义属性;如果没有此类属性,则数组为空。

例外

attributeTypenull

attributeType 不是 Type 运行时提供的对象。 例如, attributeType 是一个 TypeBuilder 对象。

适用于