WRITING YOUR FIRST PROGRAM IN C# (CSHARP)
Tags: csharp, beginners, tutorial, dotnet
Published: 2022-12-20 21:42:43




It is always lovely to have newbies , especially one ready to try their hands on C# , as promised our introduction to C# starts today with the  famous way in which every programmer kick starts their coding career , relax and follow this article carefully as you on the verge of building your first program.


**
FIRST PROGRAM?????**


Yes, that what you saw , it not an error of any sort , you will surely become a developer /programmer today and you will run your first program . 
Some questions will be running on your minds as to the possibility of this.


**HOW??**


However before we kick start this lovely journey , I will like to chip in an analogy here , Every professional player of the football game plays on a standard pitch , a carpenter likewise works on his standard bench , also every Doctor works and operates a patient in a well equipped , state of the art theater . Likewise you  especially as  a  C# programmer , your platform for which you perform your magic with codes and also feed command  you wish the computer to implement is done through an environment called IDE .

**
WHAT IS AN IDE???**


IDE an acronym for Integrated Development Environment. It is a software application that efficiently helps  programmers develop software that are both efficient and effective. 


This is maybe the first problem a lot of newbies face , on the question of the right IDE  to use , Let me share to you the good news , they are pretty much a lot of IDEs you could pick from and 99% of them will do the job efficiently.


In C# , they are plethora of IDEs to use ,like the Microsoft Visual Studio (community edition or professional will do ) ,  The Rider IDE , SlickEdit , MonoDevelop , Dev Express , However I will recommend the Visual Studio as it is the one I will use in C# tutorials here.

 
**WRITNG YOUR FIRST PROGRAM IN C#**


Like in any field , your first step is much remembered and crucial as  it marks the beginning of something you’ve gained much interest in , and also ignites that excitement for the bigger ,amazing challenges and journey to come. Here today we will be compiling a program that prints hello world on the screen. Follow carefully as I walk you through the steps.


1.	Open your Visual Studio or any IDE of your choice and Locate the “FILE” tab and Select ”NEW” 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qnha4kj8673qhsu70jjk.png)




2.	Click it and select “New Project”


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/huvbtxqhi35di5g4is6u.png)


3.	A Tab Pops up , and Just by your left lies different types of programs that can be built using Visual Studio , Click on “VISUAL C#”


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bll7fqiwon084nieht85.png)


4.	Then , Click on Console Application (.NET Framework) as Illustrated below


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ykw7k52bzby8ww943jt1.png)


5.	Under “NAME ” type “HelloWorld” as filename


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pv82vkh8scsw5kgarymi.png)

6.	Click on “OK”


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5fn9hcny8wk21cf7y4qh.png)

7.	Wow , Welcome to the C# world , It is normal to be frightened by Some of the library bracketed below , You can ignore them for now that will be dealt with in subsequent post


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ebhrkazssbjjsfe28gxr.png)

8.	Between the two curly bracket beneath the Main method , kindly type Console.WriteLine(“Hello World”); , it is a syntax used to print any message on a console application.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/asmbxdzke5yetiwide1o.png)




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q4tucnkrlv7f8oxeri83.png)


9.	Up there is the Start button , Kinly Click it to run , or tap Ctrl + f5 key to run


10.	Now you have your Hello World on the Screen


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k8z351a75moplw7liz2r.png)

11.	You’ve successfully Built your first program.


**WHAT IS A CONSOLE APPLICATION???**

This is an application with no graphical user interface , and it is certainly a good way for newbies to pick up a syntax of any language. 

I Hope you learnt alot from this article , as you climb your first step to becoming that C# developer.

More articles will be rolled out to explain more concept.

You can drop reviews and questions in text box below.

©Jalalgorithm