AssemblyInstaller.CommandLine 属性

定义

获取或设置在为程序集安装创建新的 InstallContext 对象时要使用的命令行。

public:
 property cli::array <System::String ^> ^ CommandLine { cli::array <System::String ^> ^ get(); void set(cli::array <System::String ^> ^ value); };
public string[] CommandLine { get; set; }
member this.CommandLine : string[] with get, set
Public Property CommandLine As String()

属性值

String[]

String 类型的数组,它代表在为程序集安装创建新的 InstallContext 对象时要使用的命令行。

示例

在以下示例中 CommandLine , 的 AssemblyInstaller 属性设置为日志文件名称。

// Set the logfile name in the commandline argument array.
array<String^>^commandLineOptions = {"/LogFile=example.log"};
myAssemblyInstaller->CommandLine = commandLineOptions;
// Set the logfile name in the commandline argument array.
string[] commandLineOptions = new string[ 1 ] {"/LogFile=example.log"};
myAssemblyInstaller.CommandLine = commandLineOptions;
' Set the logfile name in the commandline argument array.
Dim commandLineOptions(0) As String
commandLineOptions(0) = "/LogFile=example.log"
myAssemblyInstaller.CommandLine = commandLineOptions

适用于

另请参阅