ParameterInfo.ICustomAttributeProvider.GetCustomAttributes 方法

定義

多載

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.

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.

實作

適用於

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.

實作

適用於