C# 带空格的过程参数
嗨,我需要一个包含空格的参数 在本例中,C# 带空格的过程参数,c#,C#,嗨,我需要一个包含空格的参数 在本例中,/SASE实验室工具是主题。在普通命令行下: sslist-R-H-H sinsscm01.ds.net”/SASE实验室工具“ 我如何做到这一点?这是我的密码: static void Main(string[] args) { System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInfo.FileN
/SASE实验室工具
是主题。在普通命令行下:
sslist-R-H-H sinsscm01.ds.net”/SASE实验室工具“
我如何做到这一点?这是我的密码:
static void Main(string[] args)
{
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "sslist.exe";
p.StartInfo.Arguments = "-R -H -h sinsscm01.ds.net /SASE Lab Tools";
}
此外,转义序列列表可能会让您感兴趣-
此外,转义序列列表可能会让您感兴趣-
此语法将防止发生其他问题(例如,转义C:\my\path\to\afile.txt
等)
此语法将防止发生其他问题(例如,转义C:\my\path\to\afile.txt
等)
p.StartInfo.Arguments = "-R -H -h sinsscm01.ds.net \"/SASE Lab Tools\"";
p.StartInfo.Arguments = @"-R -H -h sinsscm01.ds.net ""/SASE Lab Tools""";