Thread: Subject:How to create a C# console application?

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    34

    Subject:How to create a C# console application?

    Hello,
    I'm new to C# Programming; and running Win. XP-Pro, VC++2008.

    I'm using the help files that came with the IDE.
    It states: Start File menu, click New project, select Console Application...
    change the name to List Files, click O.K..

    The window and code pane opens. In the window I have the following:
    Solution List Files (1project).
    List Files.
    Header Files.
    stdafx.h
    targetver.h
    Recource Files.
    Source Files.
    C++ List Files.cpp
    C++ stdafx.cpp
    ReadMe.txt

    In the code pane I have the following:
    Code:
    #include "stdafax.h"
    
    int_tmain(int argc, _TCHAR *argv[])
    {
       
      return 0;
    }
    It then states that solution explorer pane displays various files
    that make up your project. The most important file in this project is
    the file"Program.cs," which contains the source code for your application.

    My question is: I have no such file (.cs) listed; how do I resolve this problem?
    Also, where in the code editor do I type in the class name Console?

    All for now.

    Thank you.

  2. #2
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    I'm guessing this is the Visual Studio 2008 Express Edition? If so, you downloaded the C++ one, and not the C# one. If not, then you need to make sure under Project Types you are under the Visual C# node of the tree.

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    34

    Re: Create C# Console Application

    Hello ,
    Thank you for your reply.
    Yes, it is the express edition.

    Could you give me the steps to follow
    under Project types to get under the C#
    node of the tree.

    Thank you.

  4. #4
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    If the steps you followed generated a .cpp file rather than a .cs file, then you downloaded Visual C++ Express, which is wrong edition of Express to develop C#. You need to return to the Microsoft site and download Visual C# Express.

  5. #5
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Click on the green box's Download link.

  6. #6
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Oh, and while you are at it, get the msdn express library too. It is handy to have.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 01-14-2008, 10:25 AM
  2. Replies: 12
    Last Post: 12-17-2007, 02:49 AM
  3. 'No symbols Loaded'. Simple console application
    By flipflop82 in forum C++ Programming
    Replies: 3
    Last Post: 10-20-2004, 09:10 AM
  4. making a stealthy win32 console application?
    By killdragon in forum C++ Programming
    Replies: 3
    Last Post: 09-08-2004, 02:50 PM
  5. how to line change in a console application
    By new2c++ in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2002, 09:20 PM