ModuleBuilder.GetCustomAttributes 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳套用於目前 ModuleBuilder的自訂屬性。
多載
| 名稱 | Description |
|---|---|
| GetCustomAttributes(Boolean) |
回傳所有已套用於目前 ModuleBuilder的自訂屬性。 |
| GetCustomAttributes(Type, Boolean) |
回傳所有已套用於當前 ModuleBuilder的自訂屬性,且這些屬性源自指定的屬性類型。 |
GetCustomAttributes(Boolean)
回傳所有已套用於目前 ModuleBuilder的自訂屬性。
public:
override cli::array <System::Object ^> ^ GetCustomAttributes(bool inherit);
public override object[] GetCustomAttributes(bool inherit);
override this.GetCustomAttributes : bool -> obj[]
Public Overrides Function GetCustomAttributes (inherit As Boolean) As Object()
參數
- inherit
- Boolean
此論證在此類物件中被忽略。
傳回
Object[]
一個包含自訂屬性的陣列;若沒有屬性,陣列為空。
適用於
GetCustomAttributes(Type, Boolean)
回傳所有已套用於當前 ModuleBuilder的自訂屬性,且這些屬性源自指定的屬性類型。
public:
override cli::array <System::Object ^> ^ GetCustomAttributes(Type ^ attributeType, bool inherit);
public override object[] GetCustomAttributes(Type attributeType, bool inherit);
override this.GetCustomAttributes : Type * bool -> obj[]
Public Overrides Function GetCustomAttributes (attributeType As Type, inherit As Boolean) As Object()
參數
- attributeType
- Type
屬性源自的基礎型態。
- inherit
- Boolean
此論證在此類物件中被忽略。
傳回
Object[]
一個陣列,包含在任一層級 attributeType由 衍生的自訂屬性;若不存在此類屬性,則陣列為空。
例外狀況
attributeType 是 null。
attributeType 不是 Type 執行時提供的物件。 例如, attributeType 是一個 TypeBuilder 物件。