Share via


FieldBuilder.GetCustomAttributes 方法

定义

返回为该字段定义的自定义属性。

重载

GetCustomAttributes(Boolean)

返回为该字段定义的所有自定义属性。

GetCustomAttributes(Type, Boolean)

返回为由给定类型标识的该字段定义的所有自定义属性。

GetCustomAttributes(Boolean)

Source:
FieldBuilder.cs

返回为该字段定义的所有自定义属性。

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[]

类型 Object 的数组,该类型对象表示由此 FieldBuilder 实例表示的构造函数的所有自定义属性。

例外

不支持此方法。

适用于

GetCustomAttributes(Type, Boolean)

Source:
FieldBuilder.cs

返回为由给定类型标识的该字段定义的所有自定义属性。

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[]

类型 Object 的数组,该类型对象表示由此 FieldBuilder 实例表示的构造函数的所有自定义属性。

例外

不支持此方法。

适用于