C#: How do you configure for a string[] to accept input of a whole string the way the console's main entry point accepts it broken up?-Collection of common programming errors
The Windows command API handles breaking up everything following the executable name into an array, and passes that to the executable. So from the .NET standpoint, the runtime simply accepts an already-split string from the caller.
To mimic the way the argument string is split, you need to split on spaces outside of quotes. There’s a few ways to accomplish this. There’s a very good way already covered here.