using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Threading.Tasks;
      using Microsoft.AspNetCore.Builder;
      using Microsoft.AspNetCore.Hosting;
      using Microsoft.AspNetCore.Http;
      using Microsoft.Extensions.DependencyInjection;
      
      namespace WebApp
      {
        public class Startup
        {
          public void ConfigureServices(IServiceCollection services)
          {
          }
      
          public void Configure(IApplicationBuilder app, IHostingEnvironment env)
          {
            if (env.IsDevelopment())
            {
              app.UseDeveloperExceptionPage();
            }
      
            app.Run(async (context) =>
            {
              await context.Response.WriteAsync("Hello World!");
            });
          }
        }
      }

      Csharp language logo
      ASP NET Core Creates a HelloWorld sample Startup

      C# recipes

      The following code is a simple application that prints "Hello World!" to the console when run in development mode.

      using System; using System.IO; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder;

      using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection;

      namespace WebApp

      {

      public class Startup

      {

      public void ConfigureServices(IServiceCollection services)

      {

      }

      public void Configure(IApplicationBuilder app, IHostingEnvironment env)

      {

      }

      public void Run(IAsyncResult result)

      {

      await result.AsyncTask().Result;

      Console.

      Shortcut: ac_helloworld_startup

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.