Assembly.FullName Assembly.FullName Assembly.FullName Assembly.FullName Property

Définition

Obtient le nom complet de l'assembly.Gets the display name of the assembly.

public:
 virtual property System::String ^ FullName { System::String ^ get(); };
public virtual string FullName { get; }
member this.FullName : string
Public Overridable ReadOnly Property FullName As String

Valeur de propriété

Nom complet de l'assembly.The display name of the assembly.

Implémente

Exemples

L’exemple suivant récupère le nom complet de l’assembly en cours d’exécution et le nom complet de l’assembly qui contient le Int32 type (int en c#, Integer en Visual Basic).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).

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:
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
 */
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

Remarques

Consultez AssemblyName pour obtenir une description du format du nom complet d’un assembly.See AssemblyName for a description of the format of the display name of an assembly.

Notes

Écrire votre propre code pour analyser les noms d’affichage n’est pas recommandée.Writing your own code to parse display names is not recommended. Au lieu de cela, passez le nom de l’affichage à la AssemblyName constructeur, qui analyse et remplit les champs appropriés du nouveau AssemblyName.Instead, pass the display name to the AssemblyName constructor, which parses it and populates the appropriate fields of the new AssemblyName.

Dans le .NET Framework version 2.0, architecture de processeur est ajoutée à l’identité de l’assembly et peut être spécifié en tant que partie de chaînes de nom d’assembly.In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. Toutefois, il n’est pas inclus dans la chaîne retournée par la FullName propriété, pour des raisons de compatibilité.However, it is not included in the string returned by the FullName property, for compatibility reasons. Consultez AssemblyName.ProcessorArchitecture.See AssemblyName.ProcessorArchitecture.

S’applique à

Voir aussi