I wrote this console app that reads a sequence of command line arguments and does something with them.
The problem is that if the user enters something like:
--folder "C:\my folder\" --username john
the args String array of the Main function will have 2 elements rather than 4:
1st element: "--folder"
2nd element: "C:\my folder\" --username john"
(the \" sequence is escaped as a double quote.)
Since not using quotes would result in 5 elements...
--folder C:\my folder\ --username john
1st element: --folder
2nd element: C:\my
3rd element: folder\
4th element: --username
5th element: john
... what's the best way to get around this problem?