次の方法で共有


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

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

Overloads Public Function GetMethod( _
   ByVal name As String, _   ByVal types() As Type _) As MethodInfo
[C#]
public MethodInfo GetMethod(stringname,Type[] types);
[C++]
public: MethodInfo* GetMethod(String* name,Type* types[]);
[JScript]
public function GetMethod(
   name : String,types : Type[]) : MethodInfo;

パラメータ

  • name
    メソッド名。
  • types
    検索対象のパラメータの型。

戻り値

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

例外

例外の種類 条件
ArgumentNullException name が null 参照 (Visual Basic では Nothing) か、types が null 参照 (Nothing) か、types (i) が null 参照 (Nothing) です。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, Common Language Infrastructure (CLI) Standard

参照

Module クラス | Module メンバ | System.Reflection 名前空間 | Module.GetMethod オーバーロードの一覧