Create a .NET Core console application Part 3 – Add code to your application

Open the program.cs file to add code to your application.

notepad .\Program.cs

Edit the code to ourput the current datetime. Then save the file.

using System;

namespace myApp
    class Program
        static void Main(string[] args)
            Console.WriteLine("Hello World!");
	    Console.WriteLine("The current time is " + DateTime.Now);

Time to run your application once again!

Great work! Now go and build some .NET apps!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: