O'Reilly logo

C# Primer Plus by Klaus Michelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Seven Steps to Writing a Simple C# Program

After you have successfully installed the .NET SDK and chosen a suitable editor you are ready to write and run your C# programs. This can be accomplished by performing the following seven steps (shown here by using pseudocode):

1.
Open the command console.
2.
Use the chosen text editor to type and edit the C# source code and save this text as a .cs file.
3.
Use the C# language compiler to turn this source code into a PE (.exe) or DLL (.dll) file.
4.
If the compiler detects any syntax errors in step 3, go back to step 2 and correct these errors. Continue through steps 3, 4, and so on.
5.
Run the program.
6.
Verify that the output matches your expectations. If this is not the case, go back to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required