locked
Specifying Command Line Arguments RRS feed

  • Question

  • Hi,

    I am a long time Java Developer but  am completley new to C#. I'm trying to use the Visual C# Express Edition IDE.to develop a very simple console app that needs to read some command line arguments.

    The actual app is simple, I have it coded and can build and run it from the IDE by using "Debug->Start Debug". However, I can't figure out how to specify the command line arguments I want passed to my program when it is launched from the IDE. It makes it rather hard to do anything because I can't figure out how to actually get any values in the args[] array passed to my Main method short of invoking my app from a DOS prompt instead of from the IDE.


    Thanks.

    Thursday, April 20, 2006 1:27 AM

Answers

  • Ok, turns out this is a pretty stupid question though I sure had a hard time finding it. Now that I've figured it out I'll answer my own question for the benefit of any future newbies.

    The answer is:

    1) On the top of the source code editor there is a series of tabs. I have one for my source file, one labeled Start Page,  and one labeled with my Project Name. Click on the tab with the 'Project Name' on it.

    2) Click on 'Debug' in the list on the left (Application, Build, Build Events, Debug, ...)

    3) On the 'Debug' page you can specify command line options.

    Thursday, April 20, 2006 1:59 AM