Answer the question
In order to leave comments, you need to log in
How to read this line?
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
CreateHostBuilder(args).Build().Run();
Answer the question
In order to leave comments, you need to log in
CreateHostBuilder()
- this is the method that is declared below, it returns IHostBuilder
Build() - this is the IHostBuilder method , it returns the assembled IHost
Run() - this is an extension method on IHost
My personal advice: first learn the basics of the language, and then start aspnet, otherwise you will stupid questions will arise at every step.
Also pay attention to refactoring.guru
read like this:
var a=CreateHostBuilder(args);
var b=a.Build();
b.Run();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question