次の方法で共有


Assembly.FullName プロパティ

アセンブリの表示名を取得します。

Public Overridable ReadOnly Property FullName As String
[C#]
public virtual string FullName {get;}
[C++]
public: __property virtual String* get_FullName();
[JScript]
public function get FullName() : String;

プロパティ値

アセンブリの表示名。

解説

アセンブリの表示名の書式については、 AssemblyName のトピックを参照してください。

使用例

アセンブリの完全な名前を取得する例を次に示します。

 
Dim SampleAssembly As [Assembly]
' Instantiate a target object.
Dim Integer1 As New Int32()
Dim Type1 As Type
' Set the Type instance to the target class type.
Type1 = Integer1.GetType()
' Instantiate an Assembly class to the assembly housing the Integer type.  
SampleAssembly = [Assembly].GetAssembly(Integer1.GetType())
' Write the display name of assembly including base name and version.
Console.WriteLine(("FullName=" + SampleAssembly.FullName))
        End Sub 'Snippet2

[C#] 
Assembly SampleAssembly;
// Instantiate a target object.
Int32 Integer1 = new Int32();
Type Type1;
// Set the Type instance to the target class type.
Type1 = Integer1.GetType();
// Instantiate an Assembly class to the assembly housing the Integer type.  
SampleAssembly = Assembly.GetAssembly(Integer1.GetType());
// Write the display name of assembly including base name and version.
Console.WriteLine("FullName=" + SampleAssembly.FullName);

[C++] 
Assembly* SampleAssembly;
// Instantiate a target object.
Int32 Integer1(0);
Type* Type1;
// Set the Type instance to the target class type.
Type1 = __box(Integer1)->GetType();
// Instantiate an Assembly class to the assembly housing the Integer type.  
SampleAssembly = Assembly::GetAssembly(__box(Integer1)->GetType());
// Write the display name of assembly including base name and version.
Console::WriteLine(S"FullName= {0}", SampleAssembly->FullName);

[JScript] 
var SampleAssembly : Assembly;
// Instantiate a target object.
var Integer1 : Int32 = 0;
var Type1 : Type;
// Set the Type instance to the target class type.
Type1 = Integer1.GetType();
// Instantiate an Assembly class to the assembly housing the Integer type.  
SampleAssembly = Assembly.GetAssembly(Integer1.GetType());
// Write the display name of assembly including base name and version.
Console.WriteLine("FullName=" + SampleAssembly.FullName);

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET, Common Language Infrastructure (CLI) Standard

参照

Assembly クラス | Assembly メンバ | System.Reflection 名前空間 | 完全限定型名の指定