Type.ReflectedType 속성

이 멤버를 얻는 데 사용된 클래스 개체를 가져옵니다.

네임스페이스: System
어셈블리: mscorlib(mscorlib.dll)

구문

‘선언
Public Overrides ReadOnly Property ReflectedType As Type
‘사용 방법
Dim instance As Type
Dim value As Type

value = instance.ReflectedType
public override Type ReflectedType { get; }
public:
virtual property Type^ ReflectedType {
    Type^ get () override;
}
/** @property */
public Type get_ReflectedType ()
public override function get ReflectedType () : Type

속성 값

MemberInfo 개체를 얻는 데 사용된 Type 개체입니다.

설명

이 속성은 MemberInfo에서 상속된 추상 속성을 구현합니다.

현재 Type이 제네릭 형식을 나타내거나 제네릭 형식 또는 제네릭 메서드 정의의 형식 매개 변수를 나타내는 경우 이 속성은 현재 Type을 반환합니다.

예제

다음 예제에서는 파생 클래스의 메서드의 리플렉션된 형식을 보여 줍니다. 메서드 mMyClassA에 선언된 경우에도 해당 메서드의 리플렉션된 형식은 MyClassB에서 가져옵니다.

Imports System
Imports System.Reflection

Public MustInherit Class rtype

    Public MustInherit Class MyClassA
        Public MustOverride Function m() As Integer
    End Class

    Public MustInherit Class MyClassB
        Inherits MyClassA
    End Class

    Public Shared Sub Main()
        Console.WriteLine("Reflected type of m is {0}", _
           GetType(MyClassB).GetMethod("m").ReflectedType)
    End Sub
End Class
using System;
using System.Reflection;
 
public abstract class rtype 
{
    public abstract class MyClassA 
    {
        public abstract int m(); 
    }

    public abstract class MyClassB : MyClassA 
    {
    }

    public static void Main(string[] args) 
    { 
        Console.WriteLine("Reflected type of m is {0}",
            typeof(MyClassB).GetMethod("m").ReflectedType);
    }
}
using namespace System;
using namespace System::Reflection;

public ref class rtype abstract
{
public:
   ref class MyClassA abstract
   {
   public:
      virtual int m() = 0;
   };

   ref class MyClassB abstract: public MyClassA{};
};

int main()
{
   Console::WriteLine( "Reflected type of m is {0}", rtype::MyClassB::typeid->GetMethod( "m" )->ReflectedType );
}
import System.*;
import System.Reflection.*;

abstract public class Rtype
{
    abstract public class MyClassA
    {
        public abstract int M();
    } //MyClassA
      
    abstract public class MyClassB extends MyClassA
    {
    } //MyClassB

    public static void main(String[] args)
    {
        Console.WriteLine("Reflected type of M is {0}", 
            MyClassB.class.ToType().GetMethod("M").get_ReflectedType());
    } //main
} //Rtype

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

.NET Compact Framework

2.0, 1.0에서 지원

참고 항목

참조

Type 클래스
Type 멤버
System 네임스페이스
MemberInfo
Type.DeclaringType 속성