Type.AssemblyQualifiedName 속성

Type이 로드된 어셈블리의 이름을 비롯하여 Type의 어셈블리 한정 이름을 가져옵니다.

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

구문

‘선언
Public MustOverride ReadOnly Property AssemblyQualifiedName As String
‘사용 방법
Dim instance As Type
Dim value As String

value = instance.AssemblyQualifiedName
public abstract string AssemblyQualifiedName { get; }
public:
virtual property String^ AssemblyQualifiedName {
    String^ get () abstract;
}
/** @property */
public abstract String get_AssemblyQualifiedName ()
public abstract function get AssemblyQualifiedName () : String

속성 값

Type이 로드된 어셈블리의 이름을 비롯한 Type의 어셈블리 한정 이름입니다. 현재 인스턴스가 제네릭 형식 매개 변수를 나타낼 경우에는 Null 참조(Visual Basic의 경우 Nothing)입니다.

설명

공용 언어 런타임을 지원하는 모든 컴파일러에서는 중첩 클래스의 단순한 이름을 내보내고, 리플렉션에서는 쿼리 시 다음 규칙에 따라 변환된 이름을 생성합니다.

구분 기호

의미

백슬래시(\)

이스케이프 문자입니다.

쉼표(,)

어셈블리 이름 앞에 붙습니다.

더하기 기호(+)

중첩 클래스 앞에 붙습니다.

마침표(.)

네임스페이스 식별자를 나타냅니다.

대괄호([])

형식 이름 뒤에서 형식의 배열을 나타냅니다.

- 또는 -

제네릭 형식의 경우 제네릭 형식 인수 목록을 묶습니다.

- 또는 -

형식 인수 목록에서 어셈블리로 한정된 형식을 묶습니다.

예를 들어, 다음과 같은 이름이 어셈블리로 한정된 클래스의 이름이 될 수 있습니다.

TopNamespace.SubNameSpace.ContainingClass+NestedClass, MyAssembly, Version=1.3.0.0, Culture=neutral, PublicKeyToken=b17a5c561934e089

TopNamespace.Sub+Namespace와 같이 네임스페이스에 + 기호가 포함된 경우 + 기호 앞에 이스케이프 문자(\)를 사용해야만 + 기호가 중첩 구분 기호로 해석되지 않습니다. 리플렉션에서는 이 문자열을 다음과 같이 내보냅니다.

TopNamespace.Sub\+Namespace.ContainingClass+NestedClass, MyAssembly, Version=1.3.0.0, Culture=neutral, PublicKeyToken=b17a5c561934e089 

"++"는 "\+\+"가 되고 "\"는 "\\"가 됩니다.

이 정규화된 이름은 그대로 유지되었다가 나중에 Type을 로드하는 데 사용될 수 있습니다. Type을 검색 및 로드하려면 형식 이름만 포함되거나 어셈블리 한정 형식 이름이 있는 GetType을 사용합니다. 형식 이름만 있는 GetType에서는 호출자의 어셈블리와 System 어셈블리의 Type을 찾고, 어셈블리 한정 형식 이름이 있는 GetType에서는 모든 어셈블리의 Type을 찾습니다.

형식 이름에는 해당 형식에 대한 추가 정보(참조 형식인지 포인터 형식인지 또는 배열 형식인지 등)를 나타내는 후행 문자가 포함될 수 있습니다. 이러한 후행 문자를 사용하지 않고 형식 이름을 검색하려면 t.GetElementType().ToString()을 사용합니다. 여기에서 t는 형식입니다.

어셈블리 이름을 제외한 모든 형식 이름 구성 요소 에서 공백은 의미가 있습니다. 어셈블리 이름에서 ',' 구분 기호 앞의 공백은 의미가 있으나 ',' 구분 기호 뒤의 공백은 무시됩니다.

제네릭 형식의 제네릭 인수 자체는 어셈블리 이름으로 한정되어 있습니다. 예를 들어, MyGenericClass<int>(Visual Basic의 경우 MyGenericClass(Of Integer))의 어셈블리 한정 형식 이름에서 intInt32의 어셈블리 한정 형식 이름으로 확장됩니다.

현재 Type 개체가 제네릭 매개 변수를 나타내는 경우 이 속성은 Null 참조(Visual Basic의 경우 Nothing)을 반환합니다.

예제

다음 예제에서는 클래스와 관련된 어셈블리 이름과 형식의 정규화된 이름을 표시합니다.

Imports System
Imports System.Reflection
Imports Microsoft.VisualBasic
Class MyAssemblyClass
    Public Shared Sub Main()
        Dim objType As Type = GetType(System.Array)
        ' Print the full assembly name.
        Console.WriteLine("Full assembly name: {0}.", objType.Assembly.FullName.ToString())
        ' Print the qualified assembly name.
        Console.WriteLine("Qualified assembly name: {0}.", objType.AssemblyQualifiedName.ToString())
    End Sub 'Main
End Class 'MyAssemblyClass
using System;
using System.Reflection;

class MyAssemblyClass
{

    public static void Main()
    {
        Type objType = typeof(System.Array);
                    
        // Print the full assembly name.
        Console.WriteLine ("Full assembly name: {0}.", objType.Assembly.FullName.ToString()); 

        // Print the qualified assembly name.
        Console.WriteLine ("Qualified assembly name: {0}.", objType.AssemblyQualifiedName.ToString()); 
    }
}
using namespace System;
using namespace System::Reflection;
int main()
{
   Type^ objType = System::Array::typeid;
   
   // Print the full assembly name.
   Console::WriteLine( "Full assembly name: {0}.", objType->Assembly->FullName );
   
   // Print the qualified assembly name.
   Console::WriteLine( "Qualified assembly name: {0}.", objType->AssemblyQualifiedName );
}
import System.*;
import System.Reflection.*;

class MyAssemblyClass
{
    public static void main(String[] args)
    {
        Type objType = System.Array.class.ToType();
        // Print the full assembly name.
        Console.WriteLine("Full assembly name: {0}.",
            objType.get_Assembly().get_FullName().ToString());
        // Print the qualified assembly name.
        Console.WriteLine("Qualified assembly name: {0}.",
            objType.get_AssemblyQualifiedName().ToString());
    } //main
} //MyAssemblyClass

플랫폼

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에서 지원

참고 항목

참조

Type 클래스
Type 멤버
System 네임스페이스
String 클래스
GetType
FullName
Namespace
AssemblyName

기타 리소스

정규화된 형식 이름 지정