Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > dotnet performance > august 2005 >

dotnet performance : Command-Line Args


Mike Harrington
8/17/2005 11:56:51 PM
Two-part question:

1) Why does the .NET 1.1 framework treat \" as an escape character, but
does not recoginize any other characters?

Example:

a commandline argument of:

MyProgram "C:\Program Files\"

would process the token as:

args[0] C:\Program Files"

My second question is....

Why does the .NET 2.0 framework process command-line arguments differently
than the 1.1 framework?

In the .NET 1.1 framework an argument of:

MyProgram -test:"C:\Program Files"

would be

args[0] -test:C:\Program Files

whereas .NET 2.0 is:

args[0] -test:"C:\Program
args[1] files"




Anyone have any clues?

-Mike

Bob Grommes
8/18/2005 9:52:46 AM
(1) This would be a parsing error in the 1.1 framework. Probably an
unwanted side effect of the built-in feature where \" is interpreted as
an escape sequence, combined with the fact that users don't usually
bother to specify a path with a trailing slash.

(2) This would be a parsing error introduced in the 2.0 framework.

--Bob

[quoted text, click to view]
Mike Harrington
8/18/2005 6:14:35 PM
THanks bob. I hadn't realized that I posted into the performance group
either. Sorry guys.

[quoted text, click to view]

AddThis Social Bookmark Button