Module.GetMethod メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定した条件を持つメソッドを返します。
オーバーロード
| 名前 | 説明 |
|---|---|
| GetMethod(String) |
指定した名前のメソッドを返します。 |
| GetMethod(String, Type[]) |
指定した名前とパラメーター型を持つメソッドを返します。 |
| GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) |
指定した名前、バインディング情報、呼び出し規則、およびパラメーターの型と修飾子を持つメソッドを返します。 |
GetMethod(String)
指定した名前のメソッドを返します。
public:
System::Reflection::MethodInfo ^ GetMethod(System::String ^ name);
public System.Reflection.MethodInfo GetMethod(string name);
member this.GetMethod : string -> System.Reflection.MethodInfo
Public Function GetMethod (name As String) As MethodInfo
パラメーター
- name
- String
メソッド名。
返品
指定した名前を持つ MethodInfo オブジェクト。メソッドが存在しない場合は null 。
例外
name は nullです。
適用対象
GetMethod(String, Type[])
指定した名前とパラメーター型を持つメソッドを返します。
public:
System::Reflection::MethodInfo ^ GetMethod(System::String ^ name, cli::array <Type ^> ^ types);
public System.Reflection.MethodInfo GetMethod(string name, Type[] types);
member this.GetMethod : string * Type[] -> System.Reflection.MethodInfo
Public Function GetMethod (name As String, types As Type()) As MethodInfo
パラメーター
- name
- String
メソッド名。
- types
- Type[]
検索するパラメーターの型。
返品
指定した条件に従った MethodInfo オブジェクト。メソッドが存在しない場合は null 。
例外
name が null、 types が null、または types (i) が null。
適用対象
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);
member this.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
メソッド名。
- bindingAttr
- BindingFlags
検索を制御するために使用される BindingFlags ビット フラグの 1 つ。
- binder
- Binder
このメソッドに関連するプロパティを含む Binderを実装するオブジェクト。
- callConvention
- CallingConventions
メソッドの呼び出し規則。
- types
- Type[]
検索するパラメーターの型。
- modifiers
- ParameterModifier[]
型が変更されたパラメーター シグネチャでバインドを機能させるために使用されるパラメーター修飾子の配列。
返品
指定した条件に従った MethodInfo オブジェクト。メソッドが存在しない場合は null 。
例外
name が null、 types が null、または types (i) が null。