TypeInfo.GetDeclaredMethod(String) Metodo

Definizione

Restituisce un oggetto che rappresenta il metodo specificato dichiarato dal tipo corrente.

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

Parametri

name
String

Nome del metodo.

Valori restituiti

Oggetto che rappresenta il metodo specificato, se trovato; in caso contrario, null.

Attributi

Eccezioni

name è null.

Si applica a