DynamicMethod.ReflectedType プロパティ

定義

リフレクションでメソッドを取得するために使用されたクラスを取得します。

public:
 virtual property Type ^ ReflectedType { Type ^ get(); };
public override Type ReflectedType { get; }
member this.ReflectedType : Type
Public Overrides ReadOnly Property ReflectedType As Type

プロパティ値

常に null です。

次のコード例では、動的メソッドの反射型を表示します。 このコード例は、 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

注釈

このプロパティは、常に動的メソッドの null を返します。

適用対象