Type.ReflectedType Property
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Gets the class object that was used to obtain this member.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Overrides ReadOnly Property ReflectedType As Type
public override Type ReflectedType { get; }
Property Value
Type: System.Type
The Type object through which this Type object was obtained.
Remarks
For Type objects, the value of this property is the same as the value of the DeclaringType property.
Examples
This example displays the reflected type of a nested class.
Note: |
---|
To run this example, see Building Examples That Use a Demo Method and a TextBlock Control. |
Imports System.Reflection
Public MustInherit Class Example
Public MustInherit Class MyClassB
End Class
Public Shared Sub Demo(ByVal outputBlock As System.Windows.Controls.TextBlock)
outputBlock.Text += String.Format("Reflected type of MyClassB is {0}", _
GetType(MyClassB).ReflectedType) + vbCrLf
'Outputs Example, the enclosing class.
End Sub
End 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.
}
}
Version Information
Silverlight
Supported in: 5, 4, 3
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
XNA Framework
Supported in: Xbox 360, Windows Phone OS 7.0
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.