Ignora collegamentiHome / Blog

Blog


The first program with C#, Hello World

Every true programmer has started his career by writing his first simple program, Hello World!
This simple program is often used to start a course in almost all programming languages.

Well, we run our favorite text editor and write the following code:

using System;

class HelloWorld
{
    static void Main()
    {
    Console.WriteLine("Hello World !"); 
    }
}

Save the file as HelloWorld.cs

Now, we type in a command window csc HelloWorld.cs to compile our first C# program.

Finally, we type HelloWorld.exe to run the program.



Category: C#