我有简单的 C# 控制台应用程序:
static int Main(string[] args)
{
Console.WriteLine("[" + args.Length + "]");
for (int i = 0; i < args.Length; i++)
Console.WriteLine(args[i]);
Console.ReadKey();
}
现在我打开 Windows 控制台并输入:
C: &&
cd "C:\Users\yagudin.rr\Documents\Visual Studio 2012\Projects\EmailSender\EmailSender\bin\Debug\" &&
"EmailSender.exe" "C:\Users\yagudin.rr\Documents\Visual Studio 2012\Projects\EmailSender\EmailSender\bin\Debug\" "C:\Program Files (x86)\FastReports\FastReport Studio\Bin\"
输出如下:
[4]
C:\Users\yagudin.rr\Documents\Visual Studio 2012\Projects\EmailSender\EmailSender\bin\Debug" C:\Program
Files
(x86)\FastReports\FastReport
Studio\Bin"
但我想看到这个:
[2]
C:\Users\yagudin.rr\Documents\Visual Studio 2012\Projects\EmailSender\EmailSender\bin\Debug\
C:\Program Files (x86)\FastReports\FastReport Studio\Bin\
我似乎很容易,但我已经花了很多时间来寻找解决方案。谢谢你。