Chapter 3. Creating an application using .NET 5.0
Learn how to create a C# hello-world
application.
Procedure
Create a new Console application in a directory called
my-app
:dotnet new console --output my-app
$ dotnet new console --output my-app
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The output returns:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow A simple
Hello World
console application is created from a template. The application is stored in the specifiedmy-app
directory.
Verification steps
Run the project:
dotnet run --project my-app
$ dotnet run --project my-app
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The output returns:
Hello World!
Hello World!
Copy to Clipboard Copied! Toggle word wrap Toggle overflow