我有这个路径;在C#中打开空格在路径中的Word文档
path = Cash Report\\30-03-2012 01-11-07 Cash Flow Report.Docx
当我使用下面的代码打开文件时,它会尝试打开每个单词。所以它会尝试打开cash.doc,然后Report.doc等等;
//Open the newly created file
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "WINWORD.EXE";
startInfo.Arguments = path;
Process.Start(startInfo);
有没有办法忽略空格?
“包围字符串引号。 “ – dlev 2012-03-30 00:16:37