How to pass parameters to Main() C# in visual studio for mac
Arguments can be supplied to your application within Visual Studio for Mac by right clicking on your console application in the right hand pane then going Options
> Run
> Configurations
> Default
where you'll see an Arguments
text field.
For some reason, the answer from @JosephWoodward isn't working for me. It looks like a Visual Studio bug, but I do have a workaround; the consequence is that you have to provide the arguments every time you want to start the app.
- From the menu, choose Run -> Run With -> Custom Configuration ...
- In the dialog, enter the arguments:
- If you want to debug instead of run, you need to change the Run Action at the bottom: