Type.ReflectedType Property

July 28, 2014

Gets the class object that was used to obtain this member.

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

public override Type ReflectedType { get; }

Property Value

Type: System.Type
The Type object through which this Type object was obtained.

For Type objects, the value of this property is the same as the value of the DeclaringType property.

This example displays the reflected type of a nested class.


using System;
using System.Reflection;

public abstract class Example
{
   public abstract class MyClassB
   {

   }

   public static void Demo(System.Windows.Controls.TextBlock outputBlock)
   {
      outputBlock.Text += String.Format("Reflected type of MyClassB is {0}",
          typeof(MyClassB).ReflectedType) + "\n";
      //Outputs Example, the enclosing type.
   }
}


Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft