AssemblyCollection.Add(AssemblyInfo) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Ajoute un AssemblyInfo objet à la AssemblyCollection collection.
public:
void Add(System::Web::Configuration::AssemblyInfo ^ assemblyInformation);
public void Add(System.Web.Configuration.AssemblyInfo assemblyInformation);
member this.Add : System.Web.Configuration.AssemblyInfo -> unit
Public Sub Add (assemblyInformation As AssemblyInfo)
Paramètres
- assemblyInformation
- AssemblyInfo
Valeur de chaîne spécifiant la référence d’assembly.
Exemples
L’exemple de code suivant montre comment utiliser la Add méthode. Cet exemple de code fait partie d’un exemple plus grand fourni pour la AssemblyCollection classe.
// Create a new assembly reference.
AssemblyInfo myAssembly =
new AssemblyInfo("MyAssembly, Version=1.0.0000.0, " +
"Culture=neutral, Public KeyToken=b03f5f7f11d50a3a");
// Add an assembly to the configuration.
configSection.Assemblies.Add(myAssembly);
' Create a new assembly reference.
Dim myAssembly As AssemblyInfo = New AssemblyInfo("MyAssembly, " + _
"Version=1.0.0000.0, Culture=neutral, Public KeyToken=b03f5f7f11d50a3a")
' Add an assembly to the configuration.
configSection.Assemblies.Add(myAssembly)
Remarques
Ajoute un AssemblyInfo objet à la collection. Si l’objet assembly n’est pas initialisé avec des informations d’assembly, une exception est levée. Si l’objet assembly existe déjà dans la collection, l’instruction est ignorée.