InstallerCollection.Item プロパティ
アセンブリ: System.Configuration.Install (system.configuration.install.dll 内)

Dim instance As InstallerCollection Dim index As Integer Dim value As Installer value = instance(index) instance(index) = value
public: property Installer^ default [int] { Installer^ get (int index); void set (int index, Installer^ value); }
/** @property */ public Installer get_Item (int index) /** @property */ public void set_Item (int index, Installer value)
プロパティ値
指定したインデックスにあるインストーラを表す Installer。

指定した Installer が InstallerCollection 内に配置されている場合、その Installer の Parent プロパティには、そのコレクションを格納している Installer が設定されます。

MyAssembly1.exe と MyAssembly2.exe の AssemblyInstaller インスタンスを作成する例を次に示します。これらのインスタンスは、TransactedInstaller に追加されます。インストールされるアセンブリすべての名前が、コンソールに表示されます。インストール プロセスによって、MyAssembly1.exe と MyAssembly2.exe の両方がインストールされます。
Dim myTransactedInstaller As New TransactedInstaller() Dim myAssemblyInstaller As AssemblyInstaller Dim myInstallContext As InstallContext ' Create a instance of 'AssemblyInstaller' that installs 'MyAssembly1.exe'. myAssemblyInstaller = New AssemblyInstaller("MyAssembly1.exe", Nothing) ' Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'. myTransactedInstaller.Installers.Add(myAssemblyInstaller) ' Create a instance of 'AssemblyInstaller' that installs 'MyAssembly2.exe'. myAssemblyInstaller = New AssemblyInstaller("MyAssembly2.exe", Nothing) ' Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'. myTransactedInstaller.Installers.Add(myAssemblyInstaller) 'Print the assemblies to be installed. Dim myInstallers As InstallerCollection = myTransactedInstaller.Installers Console.WriteLine(ControlChars.Newline + "Printing all assemblies to be installed") Dim i As Integer For i = 0 To myInstallers.Count - 1 If myInstallers(i).GetType().Equals(GetType(AssemblyInstaller)) Then Console.WriteLine("{0} {1}", i + 1, CType(myInstallers(i), AssemblyInstaller).Path) End If Next i
TransactedInstaller myTransactedInstaller = new TransactedInstaller(); AssemblyInstaller myAssemblyInstaller; InstallContext myInstallContext; // Create a instance of 'AssemblyInstaller' that installs 'MyAssembly1.exe'. myAssemblyInstaller = new AssemblyInstaller("MyAssembly1.exe", null); // Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'. myTransactedInstaller.Installers.Add(myAssemblyInstaller); // Create a instance of 'AssemblyInstaller' that installs 'MyAssembly2.exe'. myAssemblyInstaller = new AssemblyInstaller("MyAssembly2.exe", null); // Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'. myTransactedInstaller.Installers.Add(myAssemblyInstaller); //Print the assemblies to be installed. InstallerCollection myInstallers = myTransactedInstaller.Installers; Console.WriteLine("\nPrinting all assemblies to be installed"); for(int i = 0; i < myInstallers.Count; i++) { if((myInstallers[i].GetType()).Equals(typeof(AssemblyInstaller))) { Console.WriteLine("{0} {1}", i + 1, ((AssemblyInstaller)myInstallers[i]).Path); } }
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 'TransactedInstaller'. myTransactedInstaller->Installers->Add( myAssemblyInstaller ); // Create a instance of 'AssemblyInstaller' that installs 'MyAssembly2.exe'. myAssemblyInstaller = gcnew AssemblyInstaller( "MyAssembly2.exe",nullptr ); // Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'. myTransactedInstaller->Installers->Add( myAssemblyInstaller ); //Print the assemblies to be installed. InstallerCollection^ myInstallers = myTransactedInstaller->Installers; Console::WriteLine( "\nPrinting all assemblies to be installed" ); for ( int i = 0; i < myInstallers->Count; i++ ) { if ( dynamic_cast<AssemblyInstaller^>(myInstallers[ i ]) ) { Console::WriteLine( "{0} {1}", i + 1, safe_cast<AssemblyInstaller^>(myInstallers[ i ])->Path ); } }


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
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からInstallerCollection.Item プロパティを検索する場合は、下記のリンクをクリックしてください。

- InstallerCollection.Item プロパティのページへのリンク