FieldBuilder.GetCustomAttributes 方法
定义
返回为该字段定义的自定义属性。Returns the custom attributes defined for this field.
重载
| GetCustomAttributes(Boolean) |
返回为该字段定义的所有自定义属性。Returns all the custom attributes defined for this field. |
| GetCustomAttributes(Type, Boolean) |
返回为由给定类型标识的该字段定义的所有自定义属性。Returns all the custom attributes defined for this field identified by the given type. |
GetCustomAttributes(Boolean)
返回为该字段定义的所有自定义属性。Returns all the custom attributes defined for this field.
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
基类中自定义属性的控件继承。Controls inheritance of custom attributes from base classes.
返回
- Object[]
类型 Object 的数组,该类型对象表示由此 FieldBuilder 实例表示的构造函数的所有自定义属性。An array of type Object representing all the custom attributes of the constructor represented by this FieldBuilder instance.
例外
不支持此方法。This method is not supported.
适用于
GetCustomAttributes(Type, Boolean)
返回为由给定类型标识的该字段定义的所有自定义属性。Returns all the custom attributes defined for this field 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
自定义属性类型。The custom attribute type.
- inherit
- Boolean
基类中自定义属性的控件继承。Controls inheritance of custom attributes from base classes.
返回
- Object[]
类型 Object 的数组,该类型对象表示由此 FieldBuilder 实例表示的构造函数的所有自定义属性。An array of type Object representing all the custom attributes of the constructor represented by this FieldBuilder instance.
例外
不支持此方法。This method is not supported.