Module.GetMethodとは? わかりやすく解説

Module.GetMethod メソッド (String, Type[])

指定した名前とパラメータ型のメソッドを返します。

名前空間: System.Reflection
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Function GetMethod ( _
    name As String, _
    types As Type() _
) As MethodInfo
public MethodInfo GetMethod (
    string name,
    Type[] types
)
public:
MethodInfo^ GetMethod (
    String^ name, 
    array<Type^>^ types
)
public MethodInfo GetMethod (
    String name, 
    Type[] types
)
public function GetMethod (
    name : String, 
    types : Type[]
) : MethodInfo

パラメータ

name

メソッド名。

types

検索対象のパラメータの型。

戻り値
指定した条件に一致する MethodInfo オブジェクト。メソッドが存在しない場合は null 参照 (Visual Basic では Nothing)。

例外例外
例外の種類条件

ArgumentNullException

name が null 参照 (Visual Basic では Nothing) か、types が null 参照 (Visual Basic では Nothing) か、types (i) が null 参照 (Visual Basic では Nothing) です。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Module.GetMethod メソッド (String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

指定した名前、バインディング情報、呼び出し規約、パラメータ型、およびパラメータ修飾子を持つメソッドを返します。

名前空間: System.Reflection
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Function GetMethod ( _
    name As String, _
    bindingAttr As BindingFlags, _
    binder As Binder, _
    callConvention As CallingConventions, _
    types As Type(), _
    modifiers As ParameterModifier() _
) As MethodInfo
Dim instance As Module
Dim name As String
Dim bindingAttr As BindingFlags
Dim binder As Binder
Dim callConvention As CallingConventions
Dim types As Type()
Dim modifiers As ParameterModifier()
Dim returnValue As MethodInfo

returnValue = instance.GetMethod(name, bindingAttr, binder, callConvention, types,
 modifiers)
public MethodInfo GetMethod (
    string name,
    BindingFlags bindingAttr,
    Binder binder,
    CallingConventions callConvention,
    Type[] types,
    ParameterModifier[] modifiers
)
public:
MethodInfo^ GetMethod (
    String^ name, 
    BindingFlags bindingAttr, 
    Binder^ binder, 
    CallingConventions callConvention, 
    array<Type^>^ types, 
    array<ParameterModifier>^ modifiers
)
public MethodInfo GetMethod (
    String name, 
    BindingFlags bindingAttr, 
    Binder binder, 
    CallingConventions callConvention, 
    Type[] types, 
    ParameterModifier[] modifiers
)
public function GetMethod (
    name : String, 
    bindingAttr : BindingFlags, 
    binder : Binder, 
    callConvention : CallingConventions, 
    types : Type[], 
    modifiers : ParameterModifier[]
) : MethodInfo

パラメータ

name

メソッド名。

bindingAttr

検索を制御するために使用される BindingFlags ビット フラグの 1 つ。

binder

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

callConvention

メソッドの呼び出し規約。

types

検索対象のパラメータの型。

modifiers

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

戻り値
指定した条件に一致する MethodInfo オブジェクト。メソッドが存在しない場合は null 参照 (Visual Basic では Nothing)。

例外例外
例外の種類条件

ArgumentNullException

name が null 参照 (Visual Basic では Nothing) か、types が null 参照 (Visual Basic では Nothing) か、types (i) が null 参照 (Visual Basic では Nothing) です。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Module クラス
Module メンバ
System.Reflection 名前空間
BindingFlags 列挙体
CallingConventions 列挙体
ParameterModifier

Module.GetMethod メソッド (String)

指定した名前のメソッドを返します。

名前空間: System.Reflection
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Function GetMethod ( _
    name As String _
) As MethodInfo
Dim instance As Module
Dim name As String
Dim returnValue As MethodInfo

returnValue = instance.GetMethod(name)
public MethodInfo GetMethod (
    string name
)
public:
MethodInfo^ GetMethod (
    String^ name
)
public MethodInfo GetMethod (
    String name
)
public function GetMethod (
    name : String
) : MethodInfo

パラメータ

name

メソッド名。

戻り値
指定した名前を持つ MethodInfo オブジェクト。メソッドが存在しない場合は null 参照 (Visual Basic では Nothing)。

例外例外
例外の種類条件

ArgumentNullException

name が null 参照 (Visual Basic では Nothing) です。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Module.GetMethod メソッド

指定した基準のメソッドを返します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
Module.GetMethod (String) 指定した名前のメソッドを返します。
Module.GetMethod (String, Type[]) 指定した名前とパラメータ型のメソッドを返します。
Module.GetMethod (String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) 指定した名前、バインディング情報、呼び出し規約、パラメータ型、およびパラメータ修飾子を持つメソッドを返します。
参照参照



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「Module.GetMethod」の関連用語

Module.GetMethodのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Module.GetMethodのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS