Entry
C#.NET: How to create a new console application in Microsoft Visual Studio C#.NET?
Jan 10th, 2004 12:36
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 10 January 2004 - 08:32 pm --------------------
C#.NET: How to create a new console application in Microsoft Visual
Studio C#.NET?
---
Steps: Overview:
1. -Start Microsoft Visual studio
2. -click button 'New Project'
or 'File'->'New'->'Project'
3. -select from list 'Visual C# Projects'
in the left pane
4. -possibly change the default name and the path of this project
e.g.
Name = Application1
Location = c:\temp\visualcsharp
(change this to your own choice)
5. -double click on icon
'Console application'
in the right pane
6. -This will generate a template
to fill in your source code
e.g.
--- cut here ---------------------------------------------------------
using System;
namespace ConsoleApplication2
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
//
// TODO: Add code to start application here
//
}
}
}
--- cut here ---------------------------------------------------------
7. Fill in some source code
--- cut here ---------------------------------------------------------
using System;
namespace ConsoleApplication2
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
//
// TODO: Add code to start application here
//
System.Console.WriteLine( "Hello World from
C#" );
}
}
}
--- cut here ---------------------------------------------------------
8. Run your source code
1. Press <F5>
9. You should see then an MSDOS screen with your
application
(showing shortly 'Hello world from C#')
---
---
Internet: see also:
---
Microsoft:Visual Studio: Project: Create: New: Can you give overview?
[console / windows / Internet]
http://www.faqts.com/knowledge_base/view.phtml/aid/28187/fid/1600
----------------------------------------------------------------------