JSMethod.IsDefined(Type, Boolean) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
判斷該方法是否附加了指定的屬性類型。
此 API 支援此產品基礎結構,但無法直接用於程式碼之中。
public:
override bool IsDefined(Type ^ type, bool inherit);
public override sealed bool IsDefined(Type type, bool inherit);
override this.IsDefined : Type * bool -> bool
Public Overrides NotOverridable Function IsDefined (type As Type, inherit As Boolean) As Boolean
參數
- type
- Type
要搜尋的屬性類型。
- inherit
- Boolean
true 搜尋此成員的繼承階層以找到屬性。
傳回
false 無論哪種情況。