Command line parameter question

  • Thread starter Thread starter jcane
  • Start date Start date
J

jcane

Hi

Is it possible, in C#, to retrieve the entire literal string passed to
a console application as a command line?

I'm aware of the String array on Main, but this parses the string to
remove quotes, break arguments on spaces, etc. For legacy reasons, I
have to produce an application which accepts command line arguments
with a syntax which doesn't fit within this model.

I'm also aware of the Microsoft.VisualBasic.Interaction.Command()
function, which works and which I can use, but what I'd like to know
is, is there a more elegant approach?

Thanks
 
Aha!

Found it.

Environment.CommandLine.

The framework is very big and I've only just started working with it.
Sometimes it's hard to find things which are right in front of your
nose.
 
Back
Top