Command line parameter question

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
 
J

jcane

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top