.NET command line argument bug?

Posted by Tomas on Stack Overflow See other posts from Stack Overflow or by Tomas
Published on 2010-03-16T10:02:30Z Indexed on 2010/03/16 10:06 UTC
Read the original article Hit count: 464

Filed under:
|
|

Hello,

I am trying to read command lien argument but it seems there is some kind of bug in .NET.

The parameter which I pass to my console application

/i "C:\Projects\PC\trunk\Simulator\PDF-Source\PDF-Source\bin\Debug\ConversionFiles\dummy.pdf" /o "result"

CommandLine variable return three arguments, but I pass four and values of these arguments messed up.

/i = true

"C:\Projects\PC\trunk\Simulator\PDF-Source\PDF-Source\bin\Debug\ConversionFiles\dummy.pdf" = true

/o = "result"

As you see only the last argument is parsed corectlly. Is this bug?

regards, Tomas

My code

static void Main(string[] args)
{            
    Arguments CommandLine = new Arguments(args);

© Stack Overflow or respective owner

Related posts about .NET

Related posts about c#