Command line arguments

  • Thread starter Thread starter Hari
  • Start date Start date
H

Hari

can i have command line arguments in VS.NET applicatio?
if yes how?
Can i have some code snippets of the above functionality?

I know we can acjieve this in console application form
command prompt but how can i achieve it in an application
in VS.NET?

Thank you
 
Hari said:
can i have command line arguments in VS.NET applicatio?
if yes how?
Can i have some code snippets of the above functionality?

I know we can acjieve this in console application form
command prompt but how can i achieve it in an application
in VS.NET?

Exactly the same way - make your Main method take a string array as a
parameter, and then the command line arguments will be in the string
array.
 
Thank you for the reply Jon Skeet

But if i want to pass the command line arguments at run
time how can i do in the VS.NET environment.

Thank you in advance
 
Project (menu) > xxx Properties > Configuration properties > Debugging >
Start Options > Command Line Arguments

Yves
 
As for reading the command line parameters, you can also use
System.Environment.CommandLine or System.Environment.GetcommandLineArgs()
 
Thank you

Donald
-----Original Message-----
As for reading the command line parameters, you can also use
System.Environment.CommandLine or System.Environment.GetcommandLineArgs()





.
 
In your projects property page, choose Configuration Properties.
You can specify Command line arguments there.

Thanks

Jason
 
Back
Top