Application run parameters. How to read them?

  • Thread starter Thread starter Claire
  • Start date Start date
C

Claire

If values are sent as parameters to an application on run, how do you read
them back in visual studio c# .net please?
 
Is it a console application? Do you mean Command Line Parameters? If so, use
the Main method, which get parameters at start time.

public static void Main(string[] args)
 
Claire said:
If values are sent as parameters to an application on run, how do you read
them back in visual studio c# .net please?

From MSDN:
The Main method can use arguments, in which case, it takes one of the
following forms:

static int Main(string[] args)
static void Main(string[] args)
 
Back
Top