'Hello, World!' Program in C#

The first baby step in C# programming: print Hello, World!

Hi, welcome to C# FAQs. I create this section to collect and write frequently used C# methods. I will also write the description, or the step by step tutorial with simple english so you can understand it easily.

For the first post, I’ll show you how to write a C# program that prints “Hello, World!” on your screen. This is the simplest program in any programming language. It’s a good first step for anyone learning to code. After you finish this, you’ll understand the basic syntax in C#.

Start a new Console Application project and write following code in the Main method.

class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine("Hello, World!");
    }
}

Build and run the program, and you’ll see the program prints “Hello, World!”.

Hello, World!

Hope you enjoy this C# section. You will see more like this.

References