_Type.GetMethod メソッド

定義

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

オーバーロード

GetMethod(String, Type[])

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

GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

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

GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[])

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

GetMethod(String)

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

GetMethod(String, BindingFlags)

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

GetMethod(String, Type[], ParameterModifier[])

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

注釈

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

Type.GetMethod メソッド。

GetMethod(String, Type[])

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

public:
 System::Reflection::MethodInfo ^ GetMethod(System::String ^ name, cli::array <Type ^> ^ types);
public System.Reflection.MethodInfo GetMethod (string name, Type[] types);
abstract member GetMethod : string * Type[] -> System.Reflection.MethodInfo
Public Function GetMethod (name As String, types As Type()) As MethodInfo

パラメーター

name
String

取得するパブリック メソッドの名前を格納している String

types
Type[]

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

または

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

戻り値

指定した引数型と一致するパラメーターが設定されたパブリック メソッドが存在する場合は、そのパブリック メソッドを表す MethodInfo オブジェクト。それ以外の場合は null

注釈

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

メソッドは Type.GetMethod 、指定した引数の型と一致するパラメーターを持つ、指定されたパブリック メソッドを検索します。

適用対象

GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

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

public:
 System::Reflection::MethodInfo ^ GetMethod(System::String ^ name, 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.MethodInfo GetMethod (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, Type[] types, System.Reflection.ParameterModifier[] modifiers);
abstract member GetMethod : string * System.Reflection.BindingFlags * System.Reflection.Binder * System.Reflection.CallingConventions * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
Public Function GetMethod (name As String, bindingAttr As BindingFlags, binder As Binder, callConvention As CallingConventions, types As Type(), modifiers As ParameterModifier()) As MethodInfo

パラメーター

name
String

取得するメソッドの名前を格納している String

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 オブジェクトの配列。 既定のバインダーでは、このパラメーターは処理されません。

戻り値

指定した要件と一致するメソッドが存在する場合は、そのメソッドを表す MethodInfo オブジェクト。それ以外の場合は null

注釈

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

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

適用対象

GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[])

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

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

パラメーター

name
String

取得するメソッドの名前を格納している String

bindingAttr
BindingFlags

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

- または -

null を返す場合は 0。

binder
Binder

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

- または -

DefaultBinder を使用する場合は null

types
Type[]

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

または

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

modifiers
ParameterModifier[]

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

戻り値

指定した要件と一致するメソッドが存在する場合は、そのメソッドを表す MethodInfo オブジェクト。それ以外の場合は null

注釈

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

メソッドは Type.GetMethod 、指定したバインディング制約を使用して、指定した引数の型と修飾子と一致するパラメーターを持つ指定されたメソッドを検索します。

適用対象

GetMethod(String)

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

public:
 System::Reflection::MethodInfo ^ GetMethod(System::String ^ name);
public System.Reflection.MethodInfo GetMethod (string name);
abstract member GetMethod : string -> System.Reflection.MethodInfo
Public Function GetMethod (name As String) As MethodInfo

パラメーター

name
String

取得するパブリック メソッドの名前を格納している String

戻り値

指定した名前のパブリック メソッドが存在する場合は、そのパブリック メソッドを表す MethodInfo オブジェクト。それ以外の場合は null

注釈

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

メソッドは Type.GetMethod 、指定した名前のパブリック メソッドを検索します。

適用対象

GetMethod(String, BindingFlags)

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

public:
 System::Reflection::MethodInfo ^ GetMethod(System::String ^ name, System::Reflection::BindingFlags bindingAttr);
public System.Reflection.MethodInfo GetMethod (string name, System.Reflection.BindingFlags bindingAttr);
abstract member GetMethod : string * System.Reflection.BindingFlags -> System.Reflection.MethodInfo
Public Function GetMethod (name As String, bindingAttr As BindingFlags) As MethodInfo

パラメーター

name
String

取得するメソッドの名前を格納している String

bindingAttr
BindingFlags

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

- または -

null を返す場合は 0。

戻り値

指定した要件と一致するメソッドが存在する場合は、そのメソッドを表す MethodInfo オブジェクト。それ以外の場合は null

注釈

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

メソッドは Type.GetMethod 、指定したバインディング制約を使用して、指定したメソッドを検索します。

適用対象

GetMethod(String, Type[], ParameterModifier[])

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

public:
 System::Reflection::MethodInfo ^ GetMethod(System::String ^ name, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
public System.Reflection.MethodInfo GetMethod (string name, Type[] types, System.Reflection.ParameterModifier[] modifiers);
abstract member GetMethod : string * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
Public Function GetMethod (name As String, types As Type(), modifiers As ParameterModifier()) As MethodInfo

パラメーター

name
String

取得するパブリック メソッドの名前を格納している String

types
Type[]

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

または

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

modifiers
ParameterModifier[]

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

戻り値

指定した要件と一致するパブリック メソッドが存在する場合は、そのパブリック メソッドを表す MethodInfo オブジェクト。それ以外の場合は null

注釈

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

メソッドは Type.GetMethod 、指定した引数の型と修飾子に一致するパラメーターを持つ、指定されたパブリック メソッドを検索します。

適用対象