Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 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?

like image 925
chrisd Avatar asked Mar 22 '11 00:03

chrisd


1 Answers

Yes, you can do this through the CommandLine property of the Environment class.

Environment.CommandLine
like image 186
steinar Avatar answered Sep 26 '22 01:09

steinar