开发者

.NET command line argument bug?

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 t开发者_如何学编程hree 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);


It looks like the problem is in the Arguments class. I bet if you check out args array you will find 4 elements there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜