Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
AssemblyQualifiedName Property

Type.AssemblyQualifiedName Property

Gets the assembly-qualified name of the type, which includes the name of the assembly from which this Type object was loaded.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Public MustOverride ReadOnly Property AssemblyQualifiedName As String

Property Value

Type: System.String
The assembly-qualified name of the Type, which includes the name of the assembly from which the Type was loaded, or Nothing if the current instance represents a generic type parameter.



The assembly-qualified name of a type consists of the type name, including its namespace, followed by a comma, followed by the display name of the assembly. The display name of an assembly is obtained using the Assembly.FullName property.


In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. For example, "ProcessorArchitecture=msil". However, it is not included in the string returned by the AssemblyQualifiedName property, for compatibility reasons. See AssemblyName.ProcessorArchitecture.

All compilers that support the common language runtime emit the simple name of a nested class, and reflection constructs a mangled name when queried, in accordance with the following conventions.



Backslash (\)

Escape character.

Comma (,)

Precedes the Assembly name.

Plus sign (+)

Precedes a nested class.

Period (.)

Denotes namespace identifiers.

Brackets ([])

After a type name, denotes an array of that type.


For a generic type, encloses the generic type argument list.


Within a type argument list, encloses an assembly-qualified type.

For example, the assembly-qualified name for a class might look like this:

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

If the namespace contained a plus sign, for example TopNamespace.Sub+Namespace, then the plus sign (+) would be preceded by an escape character (\) to prevent it from being interpreted as a nesting separator. Reflection would emit this string as follows:

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

A "++" becomes "\+\+", and a "\" becomes "\\".

This qualified name can be persisted and later used to load the Type. To search for and load a Type, use GetType either with the type name only or with the assembly qualified type name. GetType with the type name only will look for the Type in the caller's assembly and then in the System assembly. GetType with the assembly qualified type name will look for the Type in any assembly.

Type names may include trailing characters that denote additional information about the type, such as whether the type is a reference type, a pointer type or an array type. To retrieve the type name without these trailing characters, use t.GetElementType().ToString(), where t is the type.

Spaces are relevant in all type name components except the assembly name. In the assembly name, spaces before the ',' separator are relevant, but spaces after the ',' separator are ignored.

Generic arguments of generic types are themselves qualified by assembly name. For example, in the assembly-qualified type name for MyGenericClass<int> (MyGenericClass(Of Integer) in Visual Basic), int is expanded to the assembly-qualified type name for Int32.

If the current Type object represents a generic parameter, this property returns Nothing.

The following example displays the assembly name associated with the class and the fully qualified name of the type.

Imports System.Reflection

Class Example
    Public Shared Sub Main()
        Dim objType As Type = GetType(System.Array)
        ' Display the full assembly name.
        Console.WriteLine("Full assembly name:{1}   {0}.", 
                          objType.Assembly.FullName.ToString(), vbCrLf)
        ' Display the qualified assembly name.
        Console.WriteLine("Qualified assembly name: {1}   {0}.", 
                          objType.AssemblyQualifiedName.ToString(), vbCrLf)
    End Sub 
End Class  
' The example displays the following output if run under the .NET Framework 4.5: 
'    Full assembly name: 
'       mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089. 
'    Qualified assembly name: 
'       System.Array, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089.

The following example compares the strings returned by the ToString method and the Name, FullName, and AssemblyQualifiedName properties.

Imports System.Collections.Generic
Imports System.Globalization

Module Example
   Public Sub Main()
      Dim t As Type = GetType(String)

      t = GetType(System.Collections.Generic.List(Of))

      Dim list As New List(Of String)()
      t = list.GetType()

      Dim v As Object = 12
      t = v.GetType()

      t = GetType(IFormatProvider)

      Dim ifmt As IFormatProvider = NumberFormatInfo.CurrentInfo
      t = ifmt.GetType()
   End Sub 

   Private Sub ShowTypeInfo(t As Type)
      Console.WriteLine("Name: {0}", t.Name)
      Console.WriteLine("Full Name: {0}", t.FullName)
      Console.WriteLine("ToString:  {0}", t.ToString())
      Console.WriteLine("Assembly Qualified Name: {0}", t.AssemblyQualifiedName)
   End Sub 
End Module 
' The example displays output like the following: 
'    Name: String 
'    Full Name: System.String 
'    ToString:  System.String 
'    Assembly Qualified Name: System.String, mscorlib, Version=, Culture=neutr 
'    al, PublicKeyToken=b77a5c561934e089 

'    Name: List`1 
'    Full Name: System.Collections.Generic.List`1 
'    ToString:  System.Collections.Generic.List`1[T] 
'    Assembly Qualified Name: System.Collections.Generic.List`1, mscorlib, Version=4. 
'    0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 

'    Name: List`1 
'    Full Name: System.Collections.Generic.List`1[[System.String, mscorlib, Version=4 
'    .0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] 
'    ToString:  System.Collections.Generic.List`1[System.String] 
'    Assembly Qualified Name: System.Collections.Generic.List`1[[System.String, mscor 
'    lib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorl 
'    ib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089 

'    Name: Int32 
'    Full Name: System.Int32 
'    ToString:  System.Int32 
'    Assembly Qualified Name: System.Int32, mscorlib, Version=, Culture=neutra 
'    l, PublicKeyToken=b77a5c561934e089 

'    Name: IFormatProvider 
'    Full Name: System.IFormatProvider 
'    ToString:  System.IFormatProvider 
'    Assembly Qualified Name: System.IFormatProvider, mscorlib, Version=, Cult 
'    ure=neutral, PublicKeyToken=b77a5c561934e089 

'    Name: NumberFormatInfo 
'    Full Name: System.Globalization.NumberFormatInfo 
'    ToString:  System.Globalization.NumberFormatInfo 
'    Assembly Qualified Name: System.Globalization.NumberFormatInfo, mscorlib, Versio 
'    n=, Culture=neutral, PublicKeyToken=b77a5c561934e089

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8

Portable Class Library

Supported in: Portable Class Library
© 2015 Microsoft