.NET Tutorial - Hello World in 5 minutes

Edit your code

In the Program.cs file, add the highlighted line after the code that prints Hello, World!, like the following:

Program.cs
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
Console.WriteLine("The current time is " + DateTime.Now);

Save the Program.cs file and select Run project associated with the file again. If you succeed, you should see an output similar to the following:

Terminal
Hello, World!
The current time is 4/27/2025 9:12:03 AM
Continue