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

Further Reading
- Angular
- ASP.NET
- C
- C#
- C++
- CSS
- Dot Net Framework
- HTML
- IoT
- Java
- JavaScript
- Kotlin
- PHP
- Power Bi
- Python
- Scratch 3.0
- TypeScript
- VB.NET
