Where is the Main method in a forms application?

前端 未结 3 1537
既然无缘
既然无缘 2020-12-10 07:03

I would like to know if there is a way to create GUI program, with main() function (just like in console app), so I\'m creating all the objects in main() and I can access/ch

3条回答
  •  粉色の甜心
    2020-12-10 07:59

    A WinForm application starts from main

    static void Main()
    {
        Application.Run(new Form1());
    }
    

    Whatever you want to do in main you can do it here

提交回复
热议问题