The following program demonstrates how to Display a Message on the Console in C#.

Basically, it is a simple C# program to demonstrate how to display on the console. The execution of the program starts with the first statement of the Main() method. Since the Main() method is declared static, it doesn’t require the creation of any object before it is called.

Further, the WriteLine() method is also a static method of the Console class. It displays the text on the console.

using System;

namespace WelcomeMessage
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to programmingempire.com!");
        }
    }
}

Output

A Program to Display a Message on the Console in C#
A Program to Display a Message on the Console in C#

Further Reading

Selection Sort in C#

Insertion Sort in C#

C# Practice Questions

programmingempire

Princites