To create a C# program, first you need to install an Integrated Development Environment (IDE) with coding and debugging tools.
We will be using Visual Studio Community Edition, this is available to download for free.
After installing it, choose the default configuration.
Next, click File->New->Project and then choose Console Application as shown below:

20987805_1876868012575226_1972982181_n

Enter a name for your Project and click OK.

Console application uses a text-only interface. We chose this type of application to focus on learning the fundamentals of C#

 

Your First Program

 

Your project will automatically generate some code in visual studio:

New Project (50).png

You will learn what each of the statements does in the upcoming lessons.
For now, remember that every C# console application must contain a method (a function) named Main. Main is the starting point of every application, i.e. the point where our program starts execution from.

We will learn about classes, methods, arguments, and namespaces in the upcoming lessons

Your First Program

To run your program, press Ctrl+F5. You will see the following screen:

New Project (5)

This is a console window. As we did not have any statements in our Main method, the program just produces a general message. Pressing any key will close the console.

Congratulations Bro, you just created your first C# program

if_Audio_-_Video_-_Game_26_2298369 (1)                                                                                 if_Audio_-_Video_-_Game_27_2298366 (1)

Leave a comment