How can I read a C# Console app's entire command line, as it was typed?

.net, c#, command-line, console-application

Solution

You can get the entire command line as originally passed to the program via

`Environment.CommandLine`

Problem

I am writing a little REPL console app, and I read a command, split it, and use a piss-poor switch statement to decide which method to call (instead of using the Strategy Pattern). I then place each command into a history, for audit. The command line when starting the app, as typed, is lost as it is already split. I would prefer to have the whole command line and get on with my loop and it's own split routine. Is it possible to get the whole command line somehow?

Original source

Related problems