Creating Console Applications (Visual C#)
This page is specific to:.NET Framework Version:2.03.5
Visual C# Application Development
Creating Console Applications (Visual C#)

C# can be used to create applications that take input and display output at the command line console. These applications are ideal for learning C# development because the user interface is so simple. Console applications are also very useful for utility programs that require little or no user interaction.

To create a console application in Visual C#, click on New on the File menu and select Project. Click on the C# Console Application project template, provide the filenames that you want, and click OK.

Using the System.Console Class

Use the Console class to read and write characters from the console, either individually or as an entire line. Output can be formatted in many different ways. For more information, see Formatting Overview.

Command-Line Arguments can be accessed using the optional string array associated with the Main method. For more information, see Command-Line Arguments (C# Programming Guide).

Example

See Also

Other Resources

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View