DynamicMethod.ReflectedType Propriedade
Definição
Obtém a classe que foi usada na reflexão para obter o método.Gets the class that was used in reflection to obtain the method.
public:
virtual property Type ^ ReflectedType { Type ^ get(); };
public override Type? ReflectedType { get; }
public override Type ReflectedType { get; }
member this.ReflectedType : Type
Public Overrides ReadOnly Property ReflectedType As Type
Valor da propriedade
Sempre null.Always null.
Exemplos
O exemplo de código a seguir exibe o tipo refletido de um método dinâmico.The following code example displays the reflected type of a dynamic method. Este exemplo de código faz parte de um exemplo maior fornecido para a DynamicMethod classe.This code example is part of a larger example provided for the DynamicMethod class.
// For dynamic methods, the reflected type is always null.
if (hello->ReflectedType == nullptr)
{
Console::WriteLine("\r\nReflectedType is null.");
}
else
{
Console::WriteLine("\r\nReflectedType: {0}", hello->ReflectedType);
}
// For dynamic methods, the reflected type is always null.
if (hello.ReflectedType == null)
{
Console.WriteLine("\r\nReflectedType is null.");
}
else
{
Console.WriteLine("\r\nReflectedType: {0}", hello.ReflectedType);
}
' For dynamic methods, the reflected type is always Nothing.
If hello.ReflectedType Is Nothing Then
Console.WriteLine(vbCrLf & "ReflectedType is Nothing.")
Else
Console.WriteLine(vbCrLf & "ReflectedType: {0}", _
hello.ReflectedType)
End If
Comentários
Essa propriedade sempre retorna null para métodos dinâmicos.This property always returns null for dynamic methods.