Type.ReflectedType Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets the class object that was used to obtain this member.
Assembly: mscorlib (in mscorlib.dll)
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.
Note: |
|---|
To run this example, see Building examples that have static TextBlock controls for Windows Phone 8. |
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. } }
Show:
Note: