Gets the display name of the assembly.
Namespace:
System.Reflection
Assembly:
mscorlib (in mscorlib.dll)
Visual Basic (Declaration)
Public Overridable ReadOnly Property FullName As String
Dim instance As [Assembly]
Dim value As String
value = instance.FullName
public virtual string FullName { get; }
public:
virtual property String^ FullName {
String^ get ();
}
public function get FullName () : String
Implements
_Assembly..::.FullName
See AssemblyName for a description of the format of the display name of an assembly.
Note: |
|---|
Writing your own code to parse display names is not recommended. Instead, pass the display name to the AssemblyName constructor, which parses it and populates the appropriate fields of the new AssemblyName. |
In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. However, it is not included in the string returned by the FullName property, for compatibility reasons. See AssemblyName..::.ProcessorArchitecture.
The following example retrieves the display name of the currently executing assembly, and the display name of the assembly that contains the Int32 type (int in C#, Integer in Visual Basic).
Imports System.Reflection
Class Example
Shared Sub Main()
Console.WriteLine("The FullName property (also called the display name) of...")
Console.WriteLine("...the currently executing assembly:")
Console.WriteLine(Assembly.GetExecutingAssembly().FullName)
Console.WriteLine("...the assembly that contains the Int32 type:")
Console.WriteLine(GetType(Integer).Assembly.FullName)
End Sub
End Class
' This example produces output similar to the following:
'
'The FullName property (also called the display name) of...
'...the currently executing assembly:
'SilverlightApplication, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
'...the assembly that contains the Int32 type:
'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
using System;
using System.Reflection;
class Example
{
static void Main()
{
Console.WriteLine("The FullName property (also called the display name) of...");
Console.WriteLine("...the currently executing assembly:");
Console.WriteLine(Assembly.GetExecutingAssembly().FullName);
Console.WriteLine("...the assembly that contains the Int32 type:");
Console.WriteLine(typeof(int).Assembly.FullName);
}
}
/* This example produces output similar to the following:
The FullName property (also called the display name) of...
...the currently executing assembly:
SilverlightApplication, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
...the assembly that contains the Int32 type:
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
*/
using namespace System;
using namespace System::Reflection;
void main()
{
Console::WriteLine("The FullName property (also called the display name) of...");
Console::WriteLine("...the currently executing assembly:");
Console::WriteLine(Assembly::GetExecutingAssembly()->FullName);
Console::WriteLine("...the assembly that contains the Int32 type:");
Console::WriteLine(int::typeid->Assembly->FullName);
}
/* This example produces output similar to the following:
The FullName property (also called the display name) of...
...the currently executing assembly:
SilverlightApplication, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
...the assembly that contains the Int32 type:
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
*/
import System;
import System.Reflection;
class Example
{
static function Main() : void
{
Console.WriteLine("The FullName property (also called the display name) of...");
Console.WriteLine("...the currently executing assembly:");
Console.WriteLine(Assembly.GetExecutingAssembly().FullName);
Console.WriteLine("...the assembly that contains the Int32 type:");
Console.WriteLine(int.GetType().Assembly.FullName);
}
}
Example.Main();
/* This example produces output similar to the following:
The FullName property (also called the display name) of...
...the currently executing assembly:
SilverlightApplication, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
...the assembly that contains the Int32 type:
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
*/
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
.NET Framework
Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
.NET Compact Framework
Supported in: 3.5, 2.0, 1.0
XNA Framework
Supported in: 3.0, 2.0, 1.0
Reference
Other Resources