Closed BlueRain-debug closed 1 week ago
I dont see where the problem is, quotes are not affecting the parameter count at all,
Typing ToCBS "C:\" "D:\" "E:\" "OutputCabs"
results in 4 parameters.
Maybe you got lost somewhere... (especially with your command interpreter, some interpreters do parse \ as an escape character requiring you to double it after all, really not the fault of the program and the commit does a pointless change in that regard, we expect you know how to use a cli that is non standard in such case here...)
namespace CommandLineBasics101
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine(args.Length);
}
}
}
CommandLineBasics101.exe "C:\" "D:\" "E:\" "OutputCabs" 4
I dont see where the problem is, quotes are not affecting the parameter count at all,
Typing ToCBS "C:\" "D:\" "E:\" "OutputCabs"
results in 4 parameters.
Maybe you got lost somewhere... (especially with your command interpreter, some interpreters do parse \ as an escape character requiring you to double it after all, really not the fault of the program and the commit does a pointless change in that regard, we expect you know how to use a cli that is non standard in such case here...)
This is very strange, did a quick test and it seems that command argument passing works fine on powershell, but the wrong behavior occurs on both cmd and run (meta_l-r). OK, another problem caused by Windows itself.
Trying to start the program with the parameters given in the original description will result in args.Length==1. Removing the first set of quotes does not affect the parameter passing and can solve this problem.