Installer.Parent Property


Gets or sets the installer containing the collection that this installer belongs to.

 property System::Configuration::Install::Installer ^ Parent { System::Configuration::Install::Installer ^ get(); void set(System::Configuration::Install::Installer ^ value); };
public System.Configuration.Install.Installer Parent { get; set; }
member this.Parent : System.Configuration.Install.Installer with get, set
Public Property Parent As Installer

Property Value

An Installer containing the collection that this instance belongs to, or null if this instance does not belong to a collection.



The following example demonstrates the Parent property. The Parent property gets the Installer containing the collection that this Installer belongs to.

AssemblyInstaller^ myAssemblyInstaller1 = gcnew AssemblyInstaller;
InstallerCollection^ myInstallerCollection1 = myAssemblyInstaller1->Installers;
// 'myAssemblyInstaller' is an installer of type 'AssemblyInstaller'.
myInstallerCollection1->Add( myAssemblyInstaller );

Installer^ myInstaller1 = myAssemblyInstaller->Parent;
Console::WriteLine( "Parent of myAssembly : {0}", myInstaller1 );
AssemblyInstaller myAssemblyInstaller1 = new AssemblyInstaller();
InstallerCollection myInstallerCollection1 = myAssemblyInstaller1.Installers;
// 'myAssemblyInstaller' is an installer of type 'AssemblyInstaller'.

Installer myInstaller1 = myAssemblyInstaller.Parent;
Console.WriteLine("Parent of myAssembly : {0}", myInstaller1.ToString());
Dim myAssemblyInstaller1 As New AssemblyInstaller()
Dim myInstallerCollection1 As InstallerCollection = _
' 'myAssemblyInstaller' is an installer of type 'AssemblyInstaller'.

Dim myInstaller1 As Installer = myAssemblyInstaller.Parent
Console.WriteLine("Parent of myAssembly : {0}", myInstaller1.ToString())


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

The Installers property contains a collection of installers. 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.

Applies to

See also