DynamicMethod.ReflectedType Vlastnost

Definice

Získá třídu, která byla použita v reflexi k získání metody.

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

Hodnota vlastnosti

Vždy null.

Příklady

Následující příklad kódu zobrazí reflektující typ dynamické metody. Tento příklad kódu je součástí většího příkladu uvedeného pro třídu DynamicMethod.

// 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

Poznámky

Tato vlastnost vždy vrací null dynamické metody.

Platí pro