DynamicMethod.ReflectedType Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

.NET Framework
Available since 2.0
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top