Set Startup Parameters for a C# App

  • Thread starter Thread starter E G
  • Start date Start date
E

E G

Hi,

I'm developing a C# app that monitors the data feed for a single stock.
I want to start multiple instances of app dynamically passing the stock
symbols to instances as they start up. Any ideas on how I can do this?

Thanks in advance,

EG
 
E said:
Hi,

I'm developing a C# app that monitors the data feed for a single stock.
I want to start multiple instances of app dynamically passing the stock
symbols to instances as they start up. Any ideas on how I can do this?

Command line parameters?
 
E G said:
I'm developing a C# app that monitors the data feed for a single stock.
I want to start multiple instances of app dynamically passing the stock
symbols to instances as they start up. Any ideas on how I can do this?

To use command line parameters declare the Main method of your application
with a parameter of type string[].

static void Main(string[] params)
{
.....
}

This parameter will contain the command line parameters.
To set them, when starting from the IDE, you can set them in the property
page of the project under Debugging.

Christof
 

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

Back
Top