TypeBuilder.GetCustomAttributes メソッド

定義

この型の定義済みのカスタム属性を返します。

オーバーロード

GetCustomAttributes(Boolean)

この型の定義済みのカスタム属性をすべて返します。

GetCustomAttributes(Type, Boolean)

現在の型のカスタム属性のうち、指定された型に代入可能なものすべてを返します。

GetCustomAttributes(Boolean)

ソース:
TypeBuilder.cs

この型の定義済みのカスタム属性をすべて返します。

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

この型のすべてのカスタム属性を表す、オブジェクトの配列を返します。

例外

不完全な型では、このメソッドは現在サポートされていません。 GetType() を使用して型を取得し、返された GetCustomAttributes(Boolean)Typeを呼び出します。

適用対象

GetCustomAttributes(Type, Boolean)

ソース:
TypeBuilder.cs

現在の型のカスタム属性のうち、指定された型に代入可能なものすべてを返します。

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

現在の型について定義されているカスタム属性の配列。

例外

不完全な型では、このメソッドは現在サポートされていません。 GetType() を使用して型を取得し、返された GetCustomAttributes(Boolean)Typeを呼び出します。

attributeTypenullです。

型は、基になるランタイム システムで提供されている型でなければなりません。

適用対象