_Type.GetConstructor メソッド

定義

COM オブジェクトに、GetConstructor メソッドへのバージョンに依存しないアクセスが用意されています。

オーバーロード

GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

COM オブジェクトに、GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) メソッドへのバージョンに依存しないアクセスが用意されています。

GetConstructor(BindingFlags, Binder, Type[], ParameterModifier[])

COM オブジェクトに、GetConstructor(BindingFlags, Binder, Type[], ParameterModifier[]) メソッドへのバージョンに依存しないアクセスが用意されています。

GetConstructor(Type[])

COM オブジェクトに、GetConstructor(Type[]) メソッドへのバージョンに依存しないアクセスが用意されています。

注釈

このメソッドは、アンマネージ コードからマネージド クラスにアクセスするためのメソッドであり、マネージド コードから呼び出さないでください。

メソッドは Type.GetConstructor 、現在 Typeの の特定のコンストラクターを取得します。

GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

COM オブジェクトに、GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) メソッドへのバージョンに依存しないアクセスが用意されています。

public:
 System::Reflection::ConstructorInfo ^ GetConstructor(System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, System::Reflection::CallingConventions callConvention, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
public System.Reflection.ConstructorInfo GetConstructor (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, Type[] types, System.Reflection.ParameterModifier[] modifiers);
abstract member GetConstructor : System.Reflection.BindingFlags * System.Reflection.Binder * System.Reflection.CallingConventions * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.ConstructorInfo
Public Function GetConstructor (bindingAttr As BindingFlags, binder As Binder, callConvention As CallingConventions, types As Type(), modifiers As ParameterModifier()) As ConstructorInfo

パラメーター

bindingAttr
BindingFlags

検索の実行方法を指定する 1 つ以上の BindingFlags から成るビットマスク。

- または -

null を返す場合は 0。

binder
Binder

一連のプロパティを定義し、バインディングを有効にする Binder オブジェクト。バインディングには、オーバーロードされたメソッドの選択、引数の型の強制変換、リフレクションによるメンバーの呼び出しなどが含まれます。

- または -

DefaultBinder を使用する場合は null

callConvention
CallingConventions

引数の順序とレイアウト、戻り値を渡す方法、引数を格納するレジスタ、スタックのクリーンアップの方法に関する一連のルールを指定する CallingConventions オブジェクト。

types
Type[]

取得するコンストラクターのパラメーターの数、順序、および型を表す Type オブジェクトの配列。

または

パラメーターをとらないコンストラクターを取得するための、Type 型の空の配列 (Type[] types = new Type[0])。

modifiers
ParameterModifier[]

types 配列内の対応する要素に関連付けられている属性を表す ParameterModifier オブジェクトの配列。 既定のバインダーでは、このパラメーターは処理されません。

戻り値

指定した要件と一致するコンストラクターが存在する場合は、そのコンストラクターを表す ConstructorInfo オブジェクト。それ以外の場合は null

注釈

このメソッドは、アンマネージ コードからマネージド クラスにアクセスするためのメソッドであり、マネージド コードから呼び出さないでください。

メソッドは Type.GetConstructor 、指定したバインディング制約と指定した呼び出し規則を使用して、指定した引数の型と修飾子に一致するパラメーターを持つコンストラクターを検索します。

適用対象

GetConstructor(BindingFlags, Binder, Type[], ParameterModifier[])

COM オブジェクトに、GetConstructor(BindingFlags, Binder, Type[], ParameterModifier[]) メソッドへのバージョンに依存しないアクセスが用意されています。

public:
 System::Reflection::ConstructorInfo ^ GetConstructor(System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
public System.Reflection.ConstructorInfo GetConstructor (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, Type[] types, System.Reflection.ParameterModifier[] modifiers);
abstract member GetConstructor : System.Reflection.BindingFlags * System.Reflection.Binder * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.ConstructorInfo
Public Function GetConstructor (bindingAttr As BindingFlags, binder As Binder, types As Type(), modifiers As ParameterModifier()) As ConstructorInfo

パラメーター

bindingAttr
BindingFlags

検索の実行方法を指定する 1 つ以上の BindingFlags から成るビットマスク。

- または -

null を返す場合は 0。

binder
Binder

一連のプロパティを定義し、バインディングを有効にする Binder オブジェクト。バインディングには、オーバーロードされたメソッドの選択、引数の型の強制変換、リフレクションによるメンバーの呼び出しなどが含まれます。

- または -

DefaultBinder を使用する場合は null

types
Type[]

取得するコンストラクターのパラメーターの数、順序、および型を表す Type オブジェクトの配列。

または

パラメーターをとらないコンストラクターを取得するための、Type 型の空の配列 (Type[] types = new Type[0])。

または

EmptyTypes.

modifiers
ParameterModifier[]

パラメーター型配列内の対応する要素に関連付けられている属性を表す ParameterModifier オブジェクトの配列。 既定のバインダーでは、このパラメーターは処理されません。

戻り値

指定した要件と一致するコンストラクターが存在する場合は、そのコンストラクターを表す ConstructorInfo オブジェクト。それ以外の場合は null

注釈

このメソッドは、アンマネージ コードからマネージド クラスにアクセスするためのメソッドであり、マネージド コードから呼び出さないでください。

メソッドは Type.GetConstructor 、指定したバインド制約を使用して、指定した引数の型と修飾子に一致するパラメーターを持つコンストラクターを検索します。

適用対象

GetConstructor(Type[])

COM オブジェクトに、GetConstructor(Type[]) メソッドへのバージョンに依存しないアクセスが用意されています。

public:
 System::Reflection::ConstructorInfo ^ GetConstructor(cli::array <Type ^> ^ types);
public System.Reflection.ConstructorInfo GetConstructor (Type[] types);
abstract member GetConstructor : Type[] -> System.Reflection.ConstructorInfo
Public Function GetConstructor (types As Type()) As ConstructorInfo

パラメーター

types
Type[]

目的のコンストラクターのパラメーターの数、順序、および型を表す Type オブジェクトの配列。

または

パラメーターをとらないコンストラクターを取得するための、Type 型の空の配列。 このような空の配列は、static フィールド EmptyTypes によって提供されます。

戻り値

パラメーター型配列の型と一致するパラメーターが設定されているパブリック インスタンス コンストラクターが存在する場合は、そのコンストラクターを表す ConstructorInfo オブジェクト。それ以外の場合は null

注釈

このメソッドは、アンマネージ コードからマネージド クラスにアクセスするためのメソッドであり、マネージド コードから呼び出さないでください。

メソッドは Type.GetConstructor 、指定した配列内の型と一致するパラメーターを持つパブリック インスタンス コンストラクターを検索します。

適用対象