JSFieldInfo.GetCustomAttributes 方法
定义
返回一个数组,其中包含附加到此字段的自定义特性。Returns an array that contains the custom attributes that are attached to this field.
重载
| GetCustomAttributes(Boolean) |
此 API 支持产品基础结构,不能在代码中直接使用。 返回一个数组,其中包含附加到此字段的自定义特性。Returns an array that contains the custom attributes that are attached to this field. |
| GetCustomAttributes(Type, Boolean) |
此 API 支持产品基础结构,不能在代码中直接使用。 返回一个数组,其中包含附加到此字段的自定义特性(只搜索指定类型的特性)。Returns an array that contains the custom attributes that are attached to this field, searching only for attributes of the specified type. |
GetCustomAttributes(Boolean)
返回一个数组,其中包含附加到此字段的自定义特性。Returns an array that contains the custom attributes that are attached to this field.
此 API 支持产品基础结构,不能在代码中直接使用。
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
如果为 true,则搜索此成员的继承层次结构以查找特性。true to search this member's inheritance hierarchy to find the attributes.
返回
- Object[]
一个 FieldInfo 对象数组,该数组包含零个元素。An array of FieldInfo objects that has zero elements.
另请参阅
适用于
GetCustomAttributes(Type, Boolean)
返回一个数组,其中包含附加到此字段的自定义特性(只搜索指定类型的特性)。Returns an array that contains the custom attributes that are attached to this field, searching only for attributes of the specified type.
此 API 支持产品基础结构,不能在代码中直接使用。
public:
override cli::array <System::Object ^> ^ GetCustomAttributes(Type ^ t, bool inherit);
public override object[] GetCustomAttributes (Type t, bool inherit);
override this.GetCustomAttributes : Type * bool -> obj[]
Public Overrides Function GetCustomAttributes (t As Type, inherit As Boolean) As Object()
参数
- t
- Type
要搜索的属性的类型。The type of attribute to search for.
- inherit
- Boolean
如果为 true,则搜索此成员的继承层次结构以查找特性。true to search this member's inheritance hierarchy to find the attributes.
返回
- Object[]
一个 FieldInfo 对象数组,该数组包含零个元素。An array of FieldInfo objects that has zero elements.