Module.GetMethod Metoda

Definicja

Zwraca metodę z określonymi kryteriami.

Przeciążenia

GetMethod(String)

Zwraca metodę o określonej nazwie.

GetMethod(String, Type[])

Zwraca metodę o określonej nazwie i typach parametrów.

GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

Zwraca metodę o określonej nazwie, informacjach o powiązaniu, konwencji wywoływania oraz typach parametrów i modyfikatorach.

GetMethod(String)

Źródło:
Module.cs
Źródło:
Module.cs
Źródło:
Module.cs

Zwraca metodę o określonej nazwie.

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

Parametry

name
String

Nazwa metody.

Zwraca

MethodInfo Obiekt o określonej nazwie lub null jeśli metoda nie istnieje.

Wyjątki

name to null.

Dotyczy

GetMethod(String, Type[])

Źródło:
Module.cs
Źródło:
Module.cs
Źródło:
Module.cs

Zwraca metodę o określonej nazwie i typach parametrów.

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

Parametry

name
String

Nazwa metody.

types
Type[]

Typy parametrów do wyszukania.

Zwraca

MethodInfo Obiekt zgodnie z określonymi kryteriami lub null jeśli metoda nie istnieje.

Wyjątki

name is null, types is null, or types (i) is null.

Dotyczy

GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

Źródło:
Module.cs
Źródło:
Module.cs
Źródło:
Module.cs

Zwraca metodę o określonej nazwie, informacjach o powiązaniu, konwencji wywoływania oraz typach parametrów i modyfikatorach.

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

Parametry

name
String

Nazwa metody.

bindingAttr
BindingFlags

BindingFlags Jedna z flag bitów używana do kontrolowania wyszukiwania.

binder
Binder

Obiekt implementujący Binderobiekt zawierający właściwości powiązane z tą metodą.

callConvention
CallingConventions

Konwencja wywoływania metody .

types
Type[]

Typy parametrów do wyszukania.

modifiers
ParameterModifier[]

Tablica modyfikatorów parametrów używana do tworzenia powiązań z podpisami parametrów, w których typy zostały zmodyfikowane.

Zwraca

MethodInfo Obiekt zgodnie z określonymi kryteriami lub null jeśli metoda nie istnieje.

Wyjątki

name is null, types is null, or types (i) is null.

Zobacz też

Dotyczy