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:
property Type^ ReflectedType {
	virtual Type^ get() override;
}

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

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