logo
Учебник_ПОА

To create a c# console application

The purpose of this topic is to acquaint you with the Visual C# Express Edition development environment as you build the simplest form of C# program, a console application. Because console applications perform all their input and output at the command line, they are ideal for quickly trying out language features and writing command-line utilities.

The features of the development environment discussed in this section will also be encountered when you develop Windows Forms applications. Don't skip this part just because you don't plan on writing console applications!

In this section, you'll learn:

The program that you create in this task uses the classes in the System.IO namespace to obtain and display a list of files and file sizes in the C:\ directory. You could use this code as a basis for a utility that searches a directory for a particular file name.

  1. On the File menu, click New Project.

The New Project dialog box appears. This dialog box lists the different default application types that Visual C# Express Edition can create.

  1. Select Console Application as your project type and change the name of your application to List Files.

The default location should be fine, but you can always enter a new path if you want.

  1. Click OK.