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

namenull 参照 (Visual Basic では Nothing) か、typesnull 参照 (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

namenull 参照 (Visual Basic では Nothing) か、typesnull 参照 (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

namenull 参照 (Visual Basic では Nothing) です。

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

Module.GetMethod メソッド

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

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



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

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

   

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



Module.GetMethod メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS