Module.GetMethod 메서드

정의

지정한 조건이 있는 메서드를 반환합니다.

오버로드

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

지정된 이름을 갖는 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);
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

지정된 조건에 따르는 MethodInfo 개체입니다. 또는 메서드가 없는 경우 null입니다.

예외

namenull이거나, typesnull이거나, 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);
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 비트 플래그 중 하나입니다.

binder
Binder

Binder를 구현하는 개체로, 이 메서드와 관련된 속성을 포함합니다.

callConvention
CallingConventions

메서드의 호출 규칙입니다.

types
Type[]

검색할 매개 변수 형식입니다.

modifiers
ParameterModifier[]

바인딩을 형식이 수정된 매개 변수 서명과 함께 작동하도록 만드는 데 사용되는 매개 변수 한정자 배열입니다.

반환

MethodInfo

지정된 조건에 따르는 MethodInfo 개체입니다. 또는 메서드가 없는 경우 null입니다.

예외

namenull이거나, typesnull이거나, types(i)가 null입니다.

추가 정보

적용 대상