Original command line as typed
I've run into a situation where it would be helpful to get the original command line as typed, rather than broken up into the args开发者_StackOverflow array. Simply joining the args into one string loses extra spaces between the arguments, and in this particular case they could be significant.
Is the original unparsed command line available anywhere?
Yes, you can do this through the CommandLine property of the Environment
class.
Environment.CommandLine
精彩评论