Assembly.ICustomAttributeProvider.GetCustomAttributes 方法
定义
重载
ICustomAttributeProvider.GetCustomAttributes(Type, Boolean) |
返回在该成员上定义、由类型标识的自定义属性数组,如果没有该类型的自定义属性,则返回空数组。Returns an array of custom attributes defined on this member, identified by type, or an empty array if there are no custom attributes of that type. |
ICustomAttributeProvider.GetCustomAttributes(Boolean) |
返回在该成员上定义的所有自定义特性的数组(已命名的特性除外),如果没有自定义特性,则返回空数组。Returns an array of all of the custom attributes defined on this member, excluding named attributes, or an empty array if there are no custom attributes. |
ICustomAttributeProvider.GetCustomAttributes(Type, Boolean)
返回在该成员上定义、由类型标识的自定义属性数组,如果没有该类型的自定义属性,则返回空数组。Returns an array of custom attributes defined on this member, identified by type, or an empty array if there are no custom attributes of that type.
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
自定义属性的类型。The type of the custom attributes.
- inherit
- Boolean
为 true
时,查找继承的自定义特性的层次结构链。When true
, look up the hierarchy chain for the inherited custom attribute.
返回
- Object[]
表示自定义特性的对象数组或空数组。An array of Objects representing custom attributes, or an empty array.
实现
适用于
ICustomAttributeProvider.GetCustomAttributes(Boolean)
返回在该成员上定义的所有自定义特性的数组(已命名的特性除外),如果没有自定义特性,则返回空数组。Returns an array of all of the custom attributes defined on this member, excluding named attributes, or an empty array if there are no custom attributes.
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
时,查找继承的自定义特性的层次结构链。When true
, look up the hierarchy chain for the inherited custom attribute.
返回
- Object[]
表示自定义特性的对象数组或空数组。An array of Objects representing custom attributes, or an empty array.