This post explains how to create a simple console application in C# and make it print out a message. Console applications are the simplest applications. So, this is the perfect place to start if you have no prior knowledge of C#.
- Navigate to the Start menu by left-clicking the Windows icon in the lower-left corner of your Desktop screen.
- Then left-click the down arrow in the lower-left corner to go the Apps section and find the Visual Studio 2013 icon.
- Left-click the Visual Studio 2013 icon to open the Visual Studio 2013 application.
- Left-click FILE in the menubar, mouse over New in the submenu, and left-click Project in the submenu to open the New Project dialog.
- Select Installed->Templates->Visual C#->Windows in the left-hand pane.
- Then left-click Console Application in the center pane.
- If you want to accept the default project name and location, left-click the OK button to finish creating the console application. Otherwise, you can first:
- Set the name of the project in the field next to “Name:” near the bottom of the dialog.
- Select a location by left-clicking the “Browse” button.
- Now the project is created. To get the program to do something, add the line
Console.WriteLine("God is Love!");
to the code file “Program.cs” so that the final code looks like this:
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication { class Program { static void Main(string[] args) { Console.WriteLine("God is Love!"); } } }
- To compile and run the program, left-click DEBUG in the menubar and left-click Start Without Debugging in the submenu.
- When the program finishes compiling and runs, a console window should open like this one with the message “God is Love!” inside of it.
Tags: 2013, C Sharp, C#, computer programming, console application, console window, microsoft, visual studio
Michael HallBy: Michael Hall
DIFFERENT BETWEEN CONSOLE APPLICATIONS AND WINDOWS APPLICATION //////
Console applications are the simplest applications. So, this is the perfect place to start if you have no prior knowledge of C#.
Getting an error on the VS2k8 Tools:1. Visual Studio 2008 RTM is not installed.2. The Web Authoring frueate of Visual Studio is not installed.3. A previous version of the Silverlight Runtime is installed.4. A previous version of the Silverlight SDK is installed.5. The Visual Studio Update KB949325 is installed.6. A previous version of Silverlight Tools is installed.None of those are true as far as I can tell, I just uninstalled everything (except VS2k8)and then installed fresh Anyone else experience this?
Hi Paul, First, you have to make sure that you don’t have those installers inllasted in your machine. If you are sure about that, you can extract silverlight_chainer.exe by using WinRAR. And Find the exe named VS_SilverlightTools_Beta1_Setup.exe under the extracted folder and run that exe.. Hi desopedr,Not yet, man. I have been busy with a lot of things lately.. Normally, I used to do Silverlight in my spare time. but now, My manager wants me to learn Workflow Foundation for company.. so, I have too many problems in managing my time..:( Anyway, I will try and will let you know as soon as possible.
[…] Creating a C# Console Application in Visual Studio 2013 […]