#969 – Creating a Simple Console Application
November 7, 2013 2 Comments
You’ll most often create applications that have some sort of user interface, e.g. web applications, Windows Store apps, or desktop applications. You may also create components using C# that have no user interface at all, e.g. class libraries.
For testing purposes, however, it’s helpful to create a simple application that can read from or write to a console window. The console window appears as a window with a dark background when you run the application. It can display text one line at a time, or read text entered by the user. As new text is added to the bottom of the window, earlier text scrolls off the top.
You create a console application using Visual Studio by selecting the Console Application template when creating a new project.
You read from or write to the console using methods in the Console class, e.g. ReadLine and WriteLine.
Pingback: Dew Drop – November 7, 2013 (#1662) | Morning Dew
Pingback: #971 – Reading a Line of Input from the Console | 2,000 Things You Should Know About C#