Export (0) Print
Expand All
0 out of 2 rated this helpful - Rate this topic

Installer.Installers Property

Gets the collection of installers that this installer contains.

Namespace: System.Configuration.Install
Assembly: System.Configuration.Install (in system.configuration.install.dll)

public InstallerCollection Installers { get; 
/** @property */
public InstallerCollection get_Installers ()

public function get Installers () : InstallerCollection

Property Value

An InstallerCollection containing the collection of installers associated with this installer.

The Installers property contains a collection of installers that install objects needed by this Installer instance to correctly install the component. The Install, Commit, Rollback, and Uninstall methods of the Installer class go through the collection of installers and invokes the corresponding method of each installer.

If this instance of Installer is contained in an installer collection, the Parent property is the Installer instance that contains the collection. For an example of the use of the Installers collection, see the AssemblyInstaller class.

The following example demonstrates the Installers and Parent properties. The Installers property shows the InstallerCollection associated with an Installer.

AssemblyInstaller myAssemblyInstaller = new AssemblyInstaller();
ServiceInstaller myServiceInstaller = new ServiceInstaller();
EventLogInstaller myEventLogInstaller = new EventLogInstaller();

InstallerCollection myInstallerCollection = myAssemblyInstaller.Installers;

// Add Installers to the InstallerCollection of 'myAssemblyInstaller'.
myInstallerCollection.Add(myServiceInstaller);
myInstallerCollection.Add(myEventLogInstaller);

Installer[] myInstaller = new Installer[2];
myInstallerCollection.CopyTo(myInstaller,0);
// Show the contents of the InstallerCollection of 'myAssemblyInstaller'.
Console.WriteLine("Installers in the InstallerCollection : ");
for (int iIndex=0; iIndex < myInstaller.Length; iIndex++)
   Console.WriteLine(myInstaller[iIndex].ToString());

AssemblyInstaller myAssemblyInstaller = new AssemblyInstaller();
ServiceInstaller myServiceInstaller = new ServiceInstaller();
EventLogInstaller myEventLogInstaller = new EventLogInstaller();
InstallerCollection myInstallerCollection 
    = myAssemblyInstaller.get_Installers();

// Add Installers to the InstallerCollection of 'myAssemblyInstaller'.
myInstallerCollection.Add(myServiceInstaller);
myInstallerCollection.Add(myEventLogInstaller);
Installer myInstaller[] = new Installer[2];
myInstallerCollection.CopyTo(myInstaller, 0);

//Show the contents of the InstallerCollection of 'myAssemblyInstaller'.
Console.WriteLine("Installers in the InstallerCollection : ");
for (int iIndex = 0; iIndex < myInstaller.length; iIndex++) {
    Console.WriteLine(myInstaller.get_Item(iIndex).ToString());
  

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.