Adding a Project to VS 2013:
To add a project in VS;
1) Open Visual Studio
2)Go to top left corner under Start
3)Here we see a label saying 'New Project'
4)Click on This. (We can also add a new project from menu, go to File → New → Project) as shown in the following snap shot:
5)After clicking 'New Project' label, here we see a prompt 'New Project'
6)Go to Visual C# under Installed Templates Click on 'Console Application' in the middle of this prompt. (If you want to add a web application then go for a 'Web' under Visual C# and for VB projects then go to under 'Visual Basic' option, as explain in the following snap shot:
8)Press F5 to run the project, as explain in the following screen shot:
(Note: If you have multiple project in same solution, then you must set a project that you want to run before other project, as 'Set as a Start Up Project'. For this purpose right click on the project and click on the property 'Set as a Start Up Project'.)
Copy and past the following code in your
Console Application to see the output.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VisualStudio_HowToStartMyFirstApp_1
{
class Program
{
static void Main(string[] args)
{
string SaySomeThing = string.Empty;
Console.Write("Please
say some thing: ");
SaySomeThing = Console.ReadLine();
Console.WriteLine();
Console.WriteLine("You
entered: " + SaySomeThing);
Console.WriteLine();
Console.ReadKey();
}
}
}
9)Output:
10)Enjoy:)
(Practice Makes a Man Perfect)

No comments:
Post a Comment