Tutorial on How to create my first C# console application in Microsoft Visual Studio


This Tutorial is basically for the begineers of C#. This tutorial is only for C sharp learners. To create a console application program follow the following steps in the serial order.

1.Open Microsoft Visual Studio 2005/2008 from going to start menu then all programs and then search for Microsoft Visual Studio 2005 or 2008 version.It will look like a folder.

2. Go to that folder,ie take your mouse cursor to the position of that folder.

3. It will open a slider menu and you will find a tab with name Microsoft Visual Studio.

4.Click on this link and wait for 5-10 seconds .It will open microsoft visual studio.

5.Then Go to file menu [ press alt+f as a shortcut ] then go to new. then it will open a popup with lot of menu.

6. on the left side on that menu select C# as you are going to learn with C#.

7.Then After clicking on C# on your left side of window,now click on the console application in the right side of your window.

8.You can choose the name and location based on your preference at the bottom of this window.

9.Press OK .It will save your settings and will open the default view of console application.It will open a default code like

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication4
class Program
static void Main(string[] args)


10. Now,write your code and press CTRL+f5 to run the program


Note: Shortcut for opening Visual Studio directly from Run Command: devenv.exe Type and hit enter to open directly.


using System;
using System.Collections.Generic;
using System.Text;

The above 3 line are Visual Studio header file like you use #include in C or cplusplus.

Example: Program for Printing Hello World Hello World... This is my first Program in Dot net

using System;
namespace Pankaj
class HelloWorld
static void Main()
Console.WriteLine("Hello World... This is my first Program in Dot net");
Console.WriteLine("Press Any Key to exit: ....");
Console.ReadKey();//this is for reading the key from the users.
/*this program is written in CSharp.
* 1. Main Method is always Static

any thing between /* and */ is called as Comment .

Hope this beginner tutorial will help you. For any help on this topin leave your comment.

Thank you.

Pankaj Gupta

Like it on Facebook, Tweet it or share this article on other bookmarking websites.

Comments (0)

There are no comments posted here yet

How do you take critisism

I am willing to know about your views on critisism coming from your friends. Do you takeit positively or you react in a negative way

No answer selected. Please try again.
Please select either existing option or enter your own, however not both.
Please select minimum 0 answer(s) and maximum 3 answer(s).
[{"id":"21497","title":"Positive","votes":"75","type":"x","order":"0","pct":70.09,"resources":[]},{"id":"21498","title":"Negative","votes":"13","type":"x","order":"0","pct":12.15,"resources":[]},{"id":"21499","title":"Do not want to listen to them","votes":"19","type":"x","order":"0","pct":17.76,"resources":[]}] ["#ff5b00","#4ac0f2","#b80028","#eef66c","#60bb22","#b96a9a","#62c2cc"] ["rgba(255,91,0,0.7)","rgba(74,192,242,0.7)","rgba(184,0,40,0.7)","rgba(238,246,108,0.7)","rgba(96,187,34,0.7)","rgba(185,106,154,0.7)","rgba(98,194,204,0.7)"] 350
bottom 200
No married couple wants to end up getting divorced. It is not like they have planned for it. They try to put up with their partners for as long as they
Due to our modern lifestyle, we feel that digestion related disorders are a common problem. Thus, we neither give importance to them nor seek any help
The bond of marriage brings the two people together. Initially, everything may seem okay and both of them slowly start discovering each other in the journey.
Your online reputation is important You should know that it takes decades to make your reputation but to ruin it you need just couple of minutes and this
Basics of Cookies is Asp.Net Through this article you are able to know about the following points:1> What are the cookies?2> How to write and read cookies
  Introduction A Web server hosts information in the form of HTML files. The Web server is usually passive and merely acts as an efficient interface
Best language to learn .NET language is the best thing to learn. It has somewhat similar syntax as java and it’s a Microsoft Technology moreover it
If you decide to have an  opt-in list is not just a matter of sending your subscribers your promotional newsletters or catalogs. There are several things