First program using visual studio 2010

Hopefully you have already installed visual studio 2010. If you didn’t install yet, Install Visual Studio 2010 Step by Step.

So, let’s try to write our first program in visual studio 2010.

Step 1: Click Start -> Program -> Microsoft Visual Studio 2010 -> Microsoft Visual Studio 2010.

1

Step 2: If you open Visual Studio 2010 first time after installation in your computer. You will see the following screen. Select Visual C# Development Settings and click Start Visual Studio. We have selected Visual C# Development Settings because we will work with C#.

2

Step 3: After Clicking Start Visual Studio at previous steps you will see the following screen. Click File -> New -> Project.

3

4

Application among the projects. Note that I have changed my project location and Project name. You can keep default location and name.

5

Step 5:  Now you will see the following screen where you will develop your first program. You will see default code snippet which comes automatically.

6

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

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

}
}
}

Add a simple statement in the Main Method:

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

namespace MyFirstProgram
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("This is my first program in C#");
}
}
}

Step 6: Click Debug -> Start Without Debugging or Press – Ctrl+F5. You will see the following screen.

Output:

7

Yes! You have done! This is your first program in C#. Happy

Please share, if it is helpfulShare on FacebookShare on LinkedInTweet about this on TwitterShare on Google+Email this to someonePrint this page

Leave a Reply

Your email address will not be published. Required fields are marked *