Computer Store
-Collapse +Expand
Search C# Group:

-Collapse +Expand C# To/From
-Collapse +Expand C# Study Test
-Collapse +Expand C# Store

Prestwood eMagazine

July Edition
Subscribe now! It's Free!
Enter your email:

   ► KBProgrammingC#   Print This     
  From the December 2015 Issue of Prestwood eMag
A 10 Minute C# Console Application Quick Start
Posted 12 years ago on 10/8/2008 and updated 12/6/2008
Take Away:

This will show how to make a "hello world" console application in Visual Studio 2008 with C#. Let VS.Net do the work and create a new console application using the menu. Use Console.WriteLine and Console.ReadLine for simple input and output.


Got 10 minutes? Want to get started with C# Console Application?

This article is part of our series of 10 Minute Quick Starts. Each quick start is step by step, assumes you know very little about the subject, and takes about 10 minutes. You can use them to scratch the service of areas you want to learn and as a quick review when returning to something after a long absence.

C# Console Application

This will show how to make a "hello world" console application in Visual Studio 2008 with C#.


To get started, you have to have Visual Studio.Net installed. This article is based on Visual C# 2008 but you can use any version you wish (there may be slight variations in menu options but we try to keep our 10 Minute Quick Starts as generic as possible).

If you don't have the full version of Visual Studio .Net, you can download Visual Basic .Net Express Edition:

And, here, we, go...

  1. Launch Visual C# 2008.
  2. File | New Project
  3. In the dialog box,
    1. select "Console Application" icon
    2. Name: Hello

      You can change the name of the project later but it's easiest to specify a project name now.
      The following screen clip is from VS.Net 2008. If you're using Visual C# 2008, you're screen shot will look slightly different.
      Visual Studio 2008 C# Console application
    3. Wait...
  4. Find the section that says:

            static void Main(string[] args)

    and add

            static void Main(string[] args)
                Console.WriteLine("Hello World");

  5. Run-it! Press Control+F5 (or click Debug | Start Without Debugging)

    Note Using F5 (start debugging) will cause the program to rapidly run and exit.  Use Control+F5 to make the Application pause when it finishes.
    Hello World Cmd

That's it! You have created a console app. 

To get the exe file for deployment...

  • From the main menu, Debug | Publish Hello,
  • Follow the wizard instructions.


Share a thought or comment...
Write a Comment...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.

Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P162A1
Enter key:
Article Contributed By Bryan Valencia:

Bryan Valencia is the author of millions of lines of code and writes for PrestwoodBoards and Visual Studio Journey on-line magazines.

Visit Profile

 KB Article #101322 Counter
Since 10/8/2008

©1995-2020 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech