Type.AssemblyQualifiedName プロパティ
アセンブリ: mscorlib (mscorlib.dll 内)

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 を使用した場合は、呼び出し元のアセンブリの Type だけが検索され、次に System アセンブリが検索されます。アセンブリ修飾型名を指定して GetType を使用した場合は、任意のアセンブリ内の Type が検索されます。
型名の末尾には、その型に関する追加情報を示す文字を追加できます。たとえば、その型が参照型か、ポインタ型か、配列型かなどを表す文字を追加できます。このような末尾の文字を除いて型名だけを取得するには、t.GetElementType().ToString() を使用します。t が型を示します。
アセンブリ名を除くすべての型名コンポーネントで、スペースには意味があります。アセンブリ名では、区切り記号 ',' の前のスペースには意味がありますが、区切り記号 ',' の後のスペースは無視されます。
ジェネリック型の汎用引数はそれ自体がアセンブリ名によって修飾されています。たとえば、MyGenericClass<int> (Visual Basic の場合は MyGenericClass(Of Integer)) のアセンブリ修飾型名では、int が Int32 のアセンブリ修飾型名に拡張されます。
現在の 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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


_Type.AssemblyQualifiedName プロパティ
アセンブリ: mscorlib (mscorlib.dll 内)


このプロパティは、アンマネージ コードからマネージ クラスにアクセスするためのプロパティであるため、マネージ コードからは呼び出さないでください。
Type.AssemblyQualifiedName プロパティは、Type の読み込み元であるアセンブリの名前を含む、Type のアセンブリ修飾名を取得します。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- Type.AssemblyQualifiedNameのページへのリンク