I am trying to pass multiple paths as arguments to a console application but am getting an "Illegal characters in path" error. It appears that something is mistaking the last two characters of the argument "C:\test\"
for an escaped double-quote.
For example, if I create a new empty console application in C# like so:
static void Main(string[] args)
{
Console.WriteLine(args[0]);
Console.ReadLine();
}
and, under Project Properties -> Debug I add a command line argument like so:
then my output looks like this:
If the value is being evaluated/un-escaped, why does \t
not become a tab?
If the value is NOT being evaluated/un-escaped, why does \"
become a double-quote?
(Note: I know I can work around this by, for example, trimming trailing backslashes etc. I'm asking for help understanding why the arguments appear to be partially evaluated)