The project for creating a console application - Object-oriented programming

The project for creating a console application

To create the project in which the console application will be created, you need to execute the menu command File-> New-> Project and select the project type - Console Application , and then specify the name of the project , for example HelloApp, and specify the folder in which the project will be stored (Figure 2.6).

If you accept these settings, the compiler will create an solution, whose name matches the name of the project. In Fig. 2.7 shows how this solution looks in the development environment.

Integrated development systems are multi-window, customizable and have a large number of features. The following four main windows can be avenged.

The Solution Explorer window displays the structure of the solution being created. In the Properties window, you can see the properties of the selected program element. The selected document is displayed in the editor window (the central window), in this case - the program code of the project HelloApp.Program. Note that in this window you can display other documents, the list of which is shown at the top of the window.

In the Output window (below the editor window) the program compilation results ( Error List panel), the results of its execution ( Output panel ) or search results (panel Find Symbols Results).

New Project Window

Fig. 2.6. The New Project Window

The development system window and the default console application

Fig. 2.7. The development system window and the default console application

The constructed solution contains the only project we defined - HelloApp. The project that is created includes logical folders with project properties (the Properties folder) and references to the connected assemblies from the FCL library (the Referencies folder) and the cs file. A file with the standard name Program.cs contains a default class that includes the entry point - the Main () method (in this case, empty).

The project class is included in the namespace , which by default has the same name as the solution , and the project. Thus, when creating a new project , a special structure is created - the solution , which includes the project containing the namespace , which describes a class with the Main () method, which is the entry point to the program. For simple solutions , this structure may seem redundant, but it allows you to structure well complex applications.

The functionality of the project built by default is small. You can compile it by selecting the appropriate item (command) from the Build menu. If the compilation has passed without errors, the resulting assembly will be created, and the EXE file of the project being developed will appear in the Debug folder. The application can be started by pressing, for example, the corresponding keys (CTRL + F5 ) or by selecting the appropriate item from the Debug menu. The application will run under the control of the CLR. As a result of the program execution, a console window will appear prompting you to press any key to close the window.

thematic pictures

Also We Can Offer!

Other services that we offer

If you don’t see the necessary subject, paper type, or topic in our list of available services and examples, don’t worry! We have a number of other academic disciplines to suit the needs of anyone who visits this website looking for help.

How to ...

We made your life easier with putting together a big number of articles and guidelines on how to plan and write different types of assignments (Essay, Research Paper, Dissertation etc)