Skip to content

How to use a space separator without quotes #473

Discussion options

You must be logged in to vote

You've run into a limitation between terminals/consoles/shells and the programs they run. The shell will have already split the line on spaces so it can map the command to the program you've developed. The args in Main(string[] args) is what was already split. Given space is the default argument delimiter, the shell (and even the CommandDotNet framework) does not have enough context to understand when a user would not want that behavior. Since this is already split before the program is invoked, you'll have this problem with any framework.

If you really want to try to work around this, you can get access to the original string from Environment.CommandLine but you'll need to parse the enti…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DefinitelyADev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants