ReflectedType Property

DynamicMethod.ReflectedType Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the class that was used in reflection to obtain the method.

Namespace:  System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

public override Type ReflectedType { get; }

Property Value

Type: System.Type
Always null.

This property always returns null for dynamic methods.

The following code example displays the reflected type of a dynamic method. 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 == null)
{
   outputBlock.Text += "ReflectedType is null." + "\n";
}
else
{
   outputBlock.Text += String.Format("ReflectedType: {0}", hello.ReflectedType) + "\n";
}


Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft