Type.AssemblyQualifiedNameとは? わかりやすく解説

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 を使用した場合は、呼び出し元のアセンブリの 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
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

_Type.AssemblyQualifiedName プロパティ

メモ : このプロパティは、.NET Framework version 2.0 で新しく追加されたものです。

COM オブジェクトに、Type.AssemblyQualifiedName プロパティへのバージョンに依存しないアクセスが用意されています。

このプロパティは、CLS に準拠していません。  

名前空間: System.Runtime.InteropServices
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

ReadOnly Property AssemblyQualifiedName As
 String
Dim instance As _Type
Dim value As String

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

プロパティ値
Type の読み込み元であるアセンブリの名前を含む、Type のアセンブリ修飾名。

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「Type.AssemblyQualifiedName」の関連用語

Type.AssemblyQualifiedNameのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Type.AssemblyQualifiedNameのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS