TypeInfo.GetDeclaredMethod(String) Metódus

Definíció

Az aktuális típus által deklarált megadott metódust képviselő objektumot ad vissza.

public:
 virtual System::Reflection::MethodInfo ^ GetDeclaredMethod(System::String ^ name);
public virtual System.Reflection.MethodInfo GetDeclaredMethod(string name);
[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicMethods | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicMethods)]
public virtual System.Reflection.MethodInfo? GetDeclaredMethod(string name);
public virtual System.Reflection.MethodInfo? GetDeclaredMethod(string name);
abstract member GetDeclaredMethod : string -> System.Reflection.MethodInfo
override this.GetDeclaredMethod : string -> System.Reflection.MethodInfo
[<System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicMethods | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicMethods)>]
abstract member GetDeclaredMethod : string -> System.Reflection.MethodInfo
override this.GetDeclaredMethod : string -> System.Reflection.MethodInfo
Public Overridable Function GetDeclaredMethod (name As String) As MethodInfo

Paraméterek

name
String

A metódus neve.

Válaszok

A megadott metódust képviselő objektum, ha megtalálható; egyéb esetben. null

Attribútumok

Kivételek

name az null.

A következőre érvényes: