C# Program to display or output a message
Subject: C# Programming Course
Every programming journey starts with displaying simple message on the screen.
We would be using the Visual Studio IDE for rapid and easy development. Download Visual Studio (Community Edition-It is free) here https://visualstudio.microsoft.com/downloads/) and install it.
See screenshot 1 to 5 on how to create a Console Application.
Note: a C# console application is a simple program that runs in a command-line interface (CLI) or terminal window, without a graphical user interface (GUI). It is one of the most basic and commonly used project types in C#, often used for learning, small utilities, or backend processes.
For now we would be learning C# using the Console Application, later on we would learn how to build web application (ASP.NET Core) using C#.
After the installation create the Console application (see the screenshot) and write the program to display an "Hello TEA Learn"
Program.cs
using System;
class Program
{
private static void Main(string[] args)
{
Console.WriteLine("Hello TEA Learn");
}
}
using System; imports the namespace containing basic classes like Console.
class Program defines a class named Program.
static void Main() is the entry point of the program.
Console.WriteLine outputs text to the console.
By:
Benjamin Onuorah
Login to comment or ask question on this topic
Next Topic