Search code examples
c#visual-studioprogram-entry-point

Pass arguments through Main(string[] args) in VS


How do i pass arguments to through Main(string[] args) when I am trying to run multiple projects through Visual Studio.

I normally right click on the project and select: Debug -> Start new instance. At this point how do I pass arguments?


Solution

  • If you are running with a debugger, you can change the way the application is called through the Project Settings.

    Open Project Settings > Debug, and set Command Line Arguments.

    enter image description here