The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
InstallerCollection::AddRange Method (array<Installer^>^)
.NET Framework (current version)
Adds the specified array of installers to this collection.
Assembly: System.Configuration.Install (in System.Configuration.Install.dll)
The following example demonstrates the AddRange method of the InstallerCollection class. It creates AssemblyInstaller instances for MyAssembly1.exe and MyAssembly2.exe.These instances are added to a TransactedInstaller. The installation process installs both MyAssembly1.exe and MyAssembly2.exe.
ArrayList^ myInstallers = gcnew ArrayList; TransactedInstaller^ myTransactedInstaller = gcnew TransactedInstaller; AssemblyInstaller^ myAssemblyInstaller; InstallContext^ myInstallContext; // Create a instance of 'AssemblyInstaller' that installs 'MyAssembly1.exe'. myAssemblyInstaller = gcnew AssemblyInstaller( "MyAssembly1.exe",nullptr ); // Add the instance of 'AssemblyInstaller' to the list of installers. myInstallers->Add( myAssemblyInstaller ); // Create a instance of 'AssemblyInstaller' that installs 'MyAssembly2.exe'. myAssemblyInstaller = gcnew AssemblyInstaller( "MyAssembly2.exe",nullptr ); // Add the instance of 'AssemblyInstaller' to the list of installers. myInstallers->Add( myAssemblyInstaller ); // Add the installers to the 'TransactedInstaller' instance. myTransactedInstaller->Installers->AddRange( safe_cast<array<Installer^>^>(myInstallers->ToArray( Installer::typeid )) );
.NET Framework
Available since 1.1
Available since 1.1
Show: