Console app arguments, how arguments are passed to Main method

前端 未结 10 1203
醉话见心
醉话见心 2020-12-08 09:30

This would be question from c# beginner. When I create console application I get Main method with parameter args as array string. I do not understand how t

10条回答
  •  被撕碎了的回忆
    2020-12-08 10:13

    All answers are awesome and explained everything very well

    but I just want to point out different way for passing args to main method

    in visual studio

    1. right click on Project then choose Properties
    2. go to Debug tab then on the Start Options section provide the app with your args

    like this image

    and happy knowing secrets

提交回复
热议问题