IReflect.GetMethod メソッド

定義

指定したメソッドに対応する MethodInfo オブジェクトを取得します。

オーバーロード

GetMethod(String, BindingFlags)

指定した検索制約の下で、指定したメソッドに対応する MethodInfo オブジェクトを取得します。

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

オーバーロードされたメソッドの中から選択する MethodInfo 配列を使用して、指定したメソッドに対応する Type オブジェクトを取得します。

GetMethod(String, BindingFlags)

指定した検索制約の下で、指定したメソッドに対応する MethodInfo オブジェクトを取得します。

public:
 System::Reflection::MethodInfo ^ GetMethod(System::String ^ name, System::Reflection::BindingFlags bindingAttr);
public System.Reflection.MethodInfo? GetMethod (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

検索対象のメンバーの名前。

bindingAttr
BindingFlags

検索を制御するために使用されるバインディング属性。

戻り値

メソッド名、および bindingAttr で指定した検索制約と一致するメソッド情報を格納する MethodInfo オブジェクト。

例外

オブジェクトに複数のメソッドが同じ名前で実装されています。

こちらもご覧ください

適用対象

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

オーバーロードされたメソッドの中から選択する MethodInfo 配列を使用して、指定したメソッドに対応する Type オブジェクトを取得します。

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);
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

検索対象のメンバーの名前。

bindingAttr
BindingFlags

検索を制御するために使用されるバインディング属性。

binder
Binder

このメソッドに関連するプロパティが含まれ、Binder を実装するオブジェクト。

types
Type[]

オーバーロードされたメソッドからの選択に使用する配列。

modifiers
ParameterModifier[]

型が変更されているパラメーター シグネチャでバインドを機能させるために使われるパラメーター修飾子の配列。

戻り値

指定したすべてのパラメーターが一致する要求されたメソッド。

例外

オブジェクトに複数のメソッドが同じ名前で実装されています。

注釈

戻り値は、メソッド名、列挙型メンバー、 BindingFlags パラメーターで binder 指定された型変換の種類、オーバーロード、およびメソッドのシグネチャを記述する に ParameterInfo 基づく一致です。

こちらもご覧ください

適用対象