官术网_书友最值得收藏!

Program.cs

Like C# console applications, ASP.NET Core has the Program class, which is an important class that contains the entry point to the application. The file has the Main() method used to run the application and it is used to create an instance of WebHostBuilder for creating a host for the application. The Startup class to be used by the application is specified in the Main method:

 public class Program
{
public static void Main(string[] args)
{
BuildWebHost(args).Run();
}

public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.Build();
}
主站蜘蛛池模板: 修水县| 轮台县| 页游| 西和县| 宣城市| 阜城县| 华坪县| 章丘市| 邯郸市| 辉县市| 日喀则市| 湖北省| 黄龙县| 左云县| 宁陕县| 沁水县| 固安县| 洪泽县| 甘南县| 蒙阴县| 佛冈县| 红安县| 抚州市| 夏津县| 和顺县| 伊吾县| 米易县| 永仁县| 来宾市| 麻城市| 苏尼特右旗| 扎兰屯市| 固始县| 绵竹市| 拜泉县| 个旧市| 吉林市| 石嘴山市| 信阳市| 锡林浩特市| 博乐市|