C# Tutorial : First Code
In this tutorial I will tell you how can you prepare for developing software , ( start programming ) using c# , csharp language.
What you need.
1. You need a computer with microsoft operating system.
2. You need a plain text editor like Notepad, Notepad++
You can download Notepad++ from http://notepad-plus.sourceforge.net
3. You need c# , csharp compiler to convert your code to executable.
You can download .Net Framework from Microsoft website. My tutorial are compiled by using dot net framework version 2 . It size is about 22 MB.
Please download and install .Net Framework 2 from microsoft website. The framework works as compiler. It is normally installed in your windows folder , normally C:Windows
In my computer it is installed in : C:WINDOWSMicrosoft.NETFramework
As I am using version 2 the full path in my computer is.. C:WINDOWSMicrosoft.NETFrameworkv2.0.50727
Note: v2.0.50727 is the version number and it can be different on your computer.
If you are confused then you can search for file csc.exe inside the Framework folder. You need open the folder where csc.exe is located.
csc is csharpcompiler , it compiles our source code to executable.
Now, Start Notepad Program.
Type the following code..
//Code Starts From Here
public static void Main()
//Code Ends Here
Save Your file in the .Net framework folder with the name first.cs
now go to command prompt and change the directory to your .net framework folder.
Now from the command prompt type csc first.cs and press enter.
If you had typed correctly your code will be compiled without any error. now type first and enter.
You will see Hello World printing on the console window..