DynamicMethod.ReflectedType Tulajdonság

Definíció

Lekéri a metódus beszerzéséhez a tükröződés során használt osztályt.

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

Tulajdonság értéke

Mindig null.

Példák

Az alábbi példakód egy dinamikus metódus tükrözött típusát jeleníti meg. Ez a példakód egy nagyobb, az DynamicMethod osztályhoz tartozó példa része.

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

Megjegyzések

Ez a tulajdonság mindig dinamikus metódusokhoz null ad vissza.

A következőre érvényes: