Language

_Type.GetMethod メソッド

定義

GetMethod メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

オーバーロード

名前 説明
GetMethod(String, Type[])

GetMethod(String, Type[]) メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

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

GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

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

GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

GetMethod(String)

GetMethod(String) メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

GetMethod(String, BindingFlags)

GetMethod(String, BindingFlags) メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

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

GetMethod(String, Type[], ParameterModifier[]) メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

注釈

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

Type.GetMethod メソッド。

GetMethod(String, Type[])

GetMethod(String, Type[]) メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

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[] 型 = 新しい Type[0])。

返品

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

注釈

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

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

適用対象

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

GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

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 オブジェクト。これには、オーバーロードされたメソッドの選択、引数型の強制、およびリフレクションによるメンバーの呼び出しが含まれる場合があります。

-又は-

nullをクリックして、 DefaultBinderを使用します。

callConvention
CallingConventions

引数の順序とレイアウト、戻り値の受け渡し方法、引数に使用されるレジスタ、スタックのクリーンアップ方法に関して使用する規則のセットを指定する CallingConventions オブジェクト。

types
Type[]

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

-又は-

パラメーターを受け取っていないメソッドを取得 Type 型の空の配列 (つまり、Type[] 型 = 新しい Type[0])。

modifiers
ParameterModifier[]

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

返品

指定した要件に一致するメソッドが見つかった場合はメソッドを表す MethodInfo オブジェクト。それ以外の場合は null。

注釈

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

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

適用対象

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

GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

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 オブジェクト。これには、オーバーロードされたメソッドの選択、引数型の強制、およびリフレクションによるメンバーの呼び出しが含まれる場合があります。

-又は-

nullをクリックして、 DefaultBinderを使用します。

types
Type[]

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

-又は-

パラメーターを受け取っていないメソッドを取得 Type 型の空の配列 (つまり、Type[] 型 = 新しい Type[0])。

modifiers
ParameterModifier[]

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

返品

指定した要件に一致するメソッドが見つかった場合はメソッドを表す MethodInfo オブジェクト。それ以外の場合は null。

注釈

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

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

適用対象

GetMethod(String)

GetMethod(String) メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

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)

GetMethod(String, BindingFlags) メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

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

GetMethod(String, Type[], ParameterModifier[]) メソッドへのバージョンに依存しないアクセス権を持つ COM オブジェクトを提供します。

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[] 型 = 新しい Type[0])。

modifiers
ParameterModifier[]

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

返品

指定した要件に一致するパブリック メソッドを表す MethodInfo オブジェクト (見つかった場合)。それ以外の場合は null。

注釈

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

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

適用対象