Recently I was working on a console app; my start-up arguments looked like this:
ArgumentOne “c:\tmp\” “c:\tmp2”
And I got an error with the following code:
[sourcecode lang=“csharp”] string argumentone = args; string sourceDir = args; string destinationDir = args;
Turns out that the \\" escapes the final quote of the second argument, and so the third line crashes because there were only two arguments. The fix is simple: ArgumentOne "c:\\tmp" "c:\\tmp2"