Programmer's Rules


C# Hello world application in command prompt

The most simple application in C# using command line compiler


1. In the Windows command prompt write:

and create a new file.

2. Inside the file write:

3. Save the file with *.cs extention.

4. In order to compile and produce Hello.exe executable in the command prompt write:

Important: csc.exe must be in the system path or go to the folder, where csc.exe exists.

5. Now you can start the program. Put into the command prompt:

Tutorial statistics