Running another .cs file within the main program.cs file

前端 未结 2 1158
不知归路
不知归路 2021-01-27 16:51

I\'m very new to programming in general so I\'m sure this question is naive.

So, I wrote a simple magic eight ball program and I wanted to move onto an adventure game, b

2条回答
  •  再見小時候
    2021-01-27 17:31

    namespace MyApplication
    {
        static class Program
        {
            /// 
            /// The main entry point for the application.
            /// 
            [STAThread]
            static void Main()
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new /*the name of your program*/());
            }
        }
    }
    

提交回复
热议问题