473,386 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Comand line parameters in Visual Studio

How do I pass in command line parameters to the program at
startup in Visual Studio.

This is similar to doing csc program arg1 arg2.

I want to achieve the same effect running the program in
Visual Studio and pressing F5
Nov 15 '05 #1
3 6407
Declare your startup main procedure like this

static void Main(string[] cmdLine )

and then you can parse the cmdLine string array.
Hope this helps.
Cybertof.
In article <0f****************************@phx.gbl>,
an*******@discussions.microsoft.com says...
How do I pass in command line parameters to the program at
startup in Visual Studio.

This is similar to doing csc program arg1 arg2.

I want to achieve the same effect running the program in
Visual Studio and pressing F5


Nov 15 '05 #2
"CSharpUser" <an*******@discussions.microsoft.com> wrote in message
news:0f****************************@phx.gbl...
How do I pass in command line parameters to the program at
startup in Visual Studio.
Project Properties, Configuration Properties, Debugging. There is a line
(under Startup Options) called "Comand Line Arguments".
This is similar to doing csc program arg1 arg2.
No. csc is the COMPILER. do ou want to pass parameters oto the compiler or
your program?
I want to achieve the same effect running the program in
Visual Studio and pressing F5


As said.

Thomas Tomiczek
THONA Software & Consulting Ltd.
(Micrsofot MVP C#/.NET)
Nov 15 '05 #3
Thanks. That is what I was looking for.
-----Original Message-----
"CSharpUser" <an*******@discussions.microsoft.com> wrote in messagenews:0f****************************@phx.gbl...
How do I pass in command line parameters to the program at
startup in Visual Studio.
Project Properties, Configuration Properties, Debugging.

There is a line(under Startup Options) called "Comand Line Arguments".
This is similar to doing csc program arg1 arg2.
No. csc is the COMPILER. do ou want to pass parameters oto

the compiler oryour program?
I want to achieve the same effect running the program in
Visual Studio and pressing F5


As said.

Thomas Tomiczek
THONA Software & Consulting Ltd.
(Micrsofot MVP C#/.NET)
.

Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kevin Liu | last post by:
Attribute Programming generates IDL file automatically. The IDL looks like import "C:\Program Files\Microsoft Visual Studio ..NET\Vc7\PlatformSDK\include\prsht.idl"; import "C:\Program...
10
by: Adis | last post by:
Asp.Net Visual Studio 2003 SQL Server. Hi, Obtaining Data Based Upon Multiple Selections From a ListBox... I have database in Sqlserver and ListBox (Multiple Selection Mode) in my Visual...
0
by: Adis | last post by:
Hi, My purpose consists on filtering the fields "years" and "clients" of a project WinForm, in a similar way to as I make it without any problems in a previous project ASP.NET. The...
3
by: Gary O | last post by:
I would like to compile a class I have built to a library. I use the following command line: vbc /reference:Microsoft.VisualBasic.dll /t:library...
6
by: kmietas | last post by:
As in subject. Thanks in advance.
0
by: Narasimham | last post by:
Hi, I was able to successfully create a new project using the devenv command line arguments. I did devenv /command np and then specified the name of the project and its location in the
2
by: garyusenet | last post by:
Hi I'm playing around with the main method signature, and testing reading of command line paramaters. At the moment i have to build the solution, go to a command prompt, navigate to the folder,...
4
by: jx2 | last post by:
can any1 give me a good example for cli or CGI or comand line usage i've read the description on php.net but i just dont understand whats going on what do you use it for and how - i managed to run...
24
by: =?Utf-8?B?U3dhcHB5?= | last post by:
Can anyone suggest me to pass more parameters other than two parameter for events like the following? Event: Onbutton_click(object sender, EventArgs e)" Event handler: button.Click += new...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.