ICustomAttributeProvider 介面

定義

提供自訂屬性以反映支援它們的物件。

public interface class ICustomAttributeProvider
public interface ICustomAttributeProvider
[System.Runtime.InteropServices.ComVisible(true)]
public interface ICustomAttributeProvider
type ICustomAttributeProvider = interface
[<System.Runtime.InteropServices.ComVisible(true)>]
type ICustomAttributeProvider = interface
Public Interface ICustomAttributeProvider
衍生
屬性

備註

幾乎所有 Reflection 類別都可以有相關聯的屬性。 屬性可以是標準 (公用、私用、HelpString) 或自訂。

方法

GetCustomAttributes(Boolean)

傳回這個成員中定義的所有自訂屬性的陣列 (但具名屬性除外),如果沒有自訂屬性,則傳回空陣列。

GetCustomAttributes(Type, Boolean)

傳回這個成員中定義的自訂屬性陣列 (依類型識別),如果沒有該類型的自訂屬性,則傳回空陣列。

IsDefined(Type, Boolean)

指出此成員上是否有定義一個或多個 attributeType 執行個體。

適用於