SUMMARY

A Visual Studio solution contains a hierarchical arrangement of items. At the top level, it contains one or more projects. Each project contains several standard items such as My Project (that represents the project as a whole), References (that records information about references to external objects), the bin and obj items (that are used by Visual Studio when building the application), and app.config (that holds configuration information). Projects also contain form, class, and other code modules.

Normally, many of these files are hidden, and you do not need to edit them directly. For example, if you double-click Solution Explorer’s My Project entry, you can use the project’s Properties pages to view and modify application values. Other hidden files store code and resources that determine a form’s appearance, and you can modify them by altering the form with the Form Designer.

Within a code module, you can use modules, classes, regions, and namespaces to group related code into blocks. You can use conditional compilation statements and conditional compilation constants to determine which code is compiled into the executable program. The Debug and Trace objects let you generate messages and alerts, depending on whether certain predefined constants are defined.

Finally, typographic elements such as comments, line continuation, and line joining let you format the code so that it is easier to read and understand. XML comments provide additional information that is useful ...

Get Visual Basic 2012 Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.