Export (0) Print
Expand All

DynamicMethod.ReflectedType Property

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.

Implements

_MemberInfo.ReflectedType

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)
{
    Console.WriteLine("\r\nReflectedType is null.");
}
else
{
    Console.WriteLine("\r\nReflectedType: {0}", hello.ReflectedType);
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft