TypeInfo.GetDeclaredMethod(String) Método

Definición

Devuelve un objeto que representa el método especificado declarado por el tipo actual.

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

Parámetros

name
String

Nombre del método.

Devoluciones

Objeto que representa el método especificado, si se encuentra; de lo contrario, null.

Atributos

Excepciones

name es null.

Se aplica a