How to pass parameters to Main() C# in visual studio for mac

后端 未结 5 1846
别跟我提以往
别跟我提以往 2021-01-18 05:59

I\'ve looked at the different resources for other editions of visual studio but it\'s not clear to me how to call Main with an arg here

using System;

namesp         


        
5条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-18 06:44

    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.

    1. From the menu, choose Run -> Run With -> Custom Configuration ...

    1. In the dialog, enter the arguments:

    1. If you want to debug instead of run, you need to change the Run Action at the bottom:

提交回复
热议问题