Assembly.FullName Vlastnost
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Získá zobrazovaný název sestavení.
public:
virtual property System::String ^ FullName { System::String ^ get(); };
public virtual string FullName { get; }
public virtual string? FullName { get; }
member this.FullName : string
Public Overridable ReadOnly Property FullName As String
Hodnota vlastnosti
Zobrazovaný název sestavení.
Implementuje
Příklady
Následující příklad načte zobrazovaný název aktuálně spuštěného sestavení a zobrazovaný název sestavení, který obsahuje Int32 typ (int v jazyce C#, Integer v jazyce Visual Basic).
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(typeof(Example).Assembly.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:
ExampleAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
...the assembly that contains the Int32 type:
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
*/
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(GetType(Example).Assembly.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:
'ExampleAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
'...the assembly that contains the Int32 type:
'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Poznámky
Podívejte AssemblyName se na popis formátu zobrazovaného názvu sestavení.
Poznámka:
Psaní vlastního kódu pro analýzu zobrazovaných názvů se nedoporučuje. Místo toho předejte zobrazovaný název konstruktoru AssemblyName , který ho analyzuje a naplní příslušná pole nového AssemblyName.
V rozhraní .NET Framework verze 2.0 je architektura procesoru přidána k identitě sestavení a lze ji zadat jako součást řetězců názvů sestavení. Není však součástí řetězce vráceného FullName vlastností z důvodu kompatibility. Viz AssemblyName.ProcessorArchitecture.