JSMethodInfo.GetCustomAttributes 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳一個陣列,包含附加於此方法的自訂屬性。
多載
| 名稱 | Description |
|---|---|
| GetCustomAttributes(Boolean) |
此 API 支援此產品基礎結構,但無法直接用於程式碼之中。 回傳一個陣列,包含附加於此方法的自訂屬性。 |
| GetCustomAttributes(Type, Boolean) |
此 API 支援此產品基礎結構,但無法直接用於程式碼之中。 回傳一個陣列,包含附加於此方法的自訂屬性,僅搜尋指定類型的屬性。 |
GetCustomAttributes(Boolean)
回傳一個陣列,包含附加於此方法的自訂屬性。
此 API 支援此產品基礎結構,但無法直接用於程式碼之中。
public:
override cli::array <System::Object ^> ^ GetCustomAttributes(bool inherit);
public override sealed object[] GetCustomAttributes(bool inherit);
override this.GetCustomAttributes : bool -> obj[]
Public Overrides NotOverridable Function GetCustomAttributes (inherit As Boolean) As Object()
參數
- inherit
- Boolean
true 搜尋此成員的繼承階層以找到屬性。
傳回
Object[]
一個包含附加於此方法的自訂屬性的陣列,或者如果沒有,則是一個元素為零的陣列。
另請參閱
適用於
GetCustomAttributes(Type, Boolean)
回傳一個陣列,包含附加於此方法的自訂屬性,僅搜尋指定類型的屬性。
此 API 支援此產品基礎結構,但無法直接用於程式碼之中。
public:
override cli::array <System::Object ^> ^ GetCustomAttributes(Type ^ type, bool inherit);
public override sealed object[] GetCustomAttributes(Type type, bool inherit);
override this.GetCustomAttributes : Type * bool -> obj[]
Public Overrides NotOverridable Function GetCustomAttributes (type As Type, inherit As Boolean) As Object()
參數
- type
- Type
要搜尋的屬性類型。
- inherit
- Boolean
true 搜尋此成員的繼承階層以找到屬性。
傳回
Object[]
一個包含附加於此方法的自訂屬性的陣列,或者如果沒有,則是一個元素為零的陣列。