C# Type ReflectedType
Description
Type ReflectedType
gets the class object that was used
to obtain this member.
Syntax
Type.ReflectedType
has the following syntax.
public override Type ReflectedType { get; }
Example
This example displays the reflected type of a nested class.
// ww w . j ava 2 s .c om
using System;
using System.Reflection;
public abstract class MyClassA
{
public abstract class MyClassB
{
}
public static void Main(string[] args)
{
Console.WriteLine("Reflected type of MyClassB is {0}",
typeof(MyClassB).ReflectedType); //outputs MyClassA, the enclosing class
}
}
The code above generates the following result.