Module.GetMethod Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Returnerar en metod med angivna villkor.
Överlagringar
| Name | Description |
|---|---|
| GetMethod(String) |
Returnerar en metod med det angivna namnet. |
| GetMethod(String, Type[]) |
Returnerar en metod med angivet namn och parametertyper. |
| GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) |
Returnerar en metod med angivet namn, bindningsinformation, anropande konvention och parametertyper och modifierare. |
GetMethod(String)
- Källa:
- Module.cs
- Källa:
- Module.cs
- Källa:
- Module.cs
- Källa:
- Module.cs
- Källa:
- Module.cs
Returnerar en metod med det angivna namnet.
public:
System::Reflection::MethodInfo ^ GetMethod(System::String ^ name);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Methods might be removed")]
public System.Reflection.MethodInfo? GetMethod(string name);
public System.Reflection.MethodInfo GetMethod(string name);
public System.Reflection.MethodInfo? GetMethod(string name);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Methods might be removed")>]
member this.GetMethod : string -> System.Reflection.MethodInfo
member this.GetMethod : string -> System.Reflection.MethodInfo
Public Function GetMethod (name As String) As MethodInfo
Parametrar
- name
- String
Metodnamnet.
Returer
Ett MethodInfo objekt med det angivna namnet eller null om metoden inte finns.
- Attribut
Undantag
name är null.
Gäller för
GetMethod(String, Type[])
- Källa:
- Module.cs
- Källa:
- Module.cs
- Källa:
- Module.cs
- Källa:
- Module.cs
- Källa:
- Module.cs
Returnerar en metod med angivet namn och parametertyper.
public:
System::Reflection::MethodInfo ^ GetMethod(System::String ^ name, cli::array <Type ^> ^ types);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Methods might be removed")]
public System.Reflection.MethodInfo? GetMethod(string name, Type[] types);
public System.Reflection.MethodInfo GetMethod(string name, Type[] types);
public System.Reflection.MethodInfo? GetMethod(string name, Type[] types);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Methods might be removed")>]
member this.GetMethod : string * Type[] -> System.Reflection.MethodInfo
member this.GetMethod : string * Type[] -> System.Reflection.MethodInfo
Public Function GetMethod (name As String, types As Type()) As MethodInfo
Parametrar
- name
- String
Metodnamnet.
- types
- Type[]
Parametertyperna som ska sökas efter.
Returer
Ett MethodInfo objekt i enlighet med de angivna kriterierna, eller null om metoden inte finns.
- Attribut
Undantag
name är null, types är null, eller types (i) är null.
Gäller för
GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
- Källa:
- Module.cs
- Källa:
- Module.cs
- Källa:
- Module.cs
- Källa:
- Module.cs
- Källa:
- Module.cs
Returnerar en metod med angivet namn, bindningsinformation, anropande konvention och parametertyper och modifierare.
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);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Methods might be removed")]
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);
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);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Methods might be removed")>]
member this.GetMethod : string * System.Reflection.BindingFlags * System.Reflection.Binder * System.Reflection.CallingConventions * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
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
Parametrar
- name
- String
Metodnamnet.
- bindingAttr
- BindingFlags
En av de BindingFlags bitflaggor som används för att styra sökningen.
- binder
- Binder
Ett objekt som implementerar Binder, som innehåller egenskaper som är relaterade till den här metoden.
- callConvention
- CallingConventions
Anropskonventionen för metoden.
- types
- Type[]
Parametertyperna som ska sökas efter.
- modifiers
- ParameterModifier[]
En matris med parametermodifierare som används för att få bindningen att fungera med parametersignaturer där typerna har ändrats.
Returer
Ett MethodInfo objekt i enlighet med de angivna kriterierna, eller null om metoden inte finns.
- Attribut
Undantag
name är null, types är null, eller types (i) är null.