MemberInfo.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[]

代表自訂屬性的物件陣列或空陣列。

實作

適用於