Module.ICustomAttributeProvider.GetCustomAttributes 方法

定义

重载

ICustomAttributeProvider.GetCustomAttributes(Boolean)

返回在该成员上定义的所有自定义特性的数组(已命名的特性除外),如果没有自定义特性,则返回空数组。

ICustomAttributeProvider.GetCustomAttributes(Type, Boolean)

返回在该成员上定义、由类型标识的自定义属性数组,如果没有该类型的自定义属性,则返回空数组。

ICustomAttributeProvider.GetCustomAttributes(Boolean)

返回在该成员上定义的所有自定义特性的数组(已命名的特性除外),如果没有自定义特性,则返回空数组。

 virtual cli::array <System::Object ^> ^ System.Reflection.ICustomAttributeProvider.GetCustomAttributes(bool inherit) = System::Reflection::ICustomAttributeProvider::GetCustomAttributes;
object[] ICustomAttributeProvider.GetCustomAttributes (bool inherit);
abstract member System.Reflection.ICustomAttributeProvider.GetCustomAttributes : bool -> obj[]
override this.System.Reflection.ICustomAttributeProvider.GetCustomAttributes : bool -> obj[]
Function GetCustomAttributes (inherit As Boolean) As Object() Implements ICustomAttributeProvider.GetCustomAttributes

参数

inherit
Boolean

true 时,查找继承的自定义特性的层次结构链。

返回

Object[]

表示自定义特性的对象数组或空数组。

实现

适用于

ICustomAttributeProvider.GetCustomAttributes(Type, Boolean)

返回在该成员上定义、由类型标识的自定义属性数组,如果没有该类型的自定义属性,则返回空数组。

 virtual cli::array <System::Object ^> ^ System.Reflection.ICustomAttributeProvider.GetCustomAttributes(Type ^ attributeType, bool inherit) = System::Reflection::ICustomAttributeProvider::GetCustomAttributes;
object[] ICustomAttributeProvider.GetCustomAttributes (Type attributeType, bool inherit);
abstract member System.Reflection.ICustomAttributeProvider.GetCustomAttributes : Type * bool -> obj[]
override this.System.Reflection.ICustomAttributeProvider.GetCustomAttributes : Type * bool -> obj[]
Function GetCustomAttributes (attributeType As Type, inherit As Boolean) As Object() Implements ICustomAttributeProvider.GetCustomAttributes

参数

attributeType
Type

自定义属性的类型。

inherit
Boolean

true 时,查找继承的自定义特性的层次结构链。

返回

Object[]

表示自定义特性的对象数组或空数组。

实现

适用于