For large code files, it is often very useful to be able to collapse some code blocks so that you can see the structure of the file. You can use the Regions and Outlining menu options in Visual Studio to achieve the desired file compression level.
You create regions by typing # Region “name of the region” in the Code Editor. End a region by inserting an #End Region statement. You can expand and collapse regions by clicking the plus and minus outlining indicators on the left margin. Figure 3-31 shows both an expanded and a collapsed region.
Figure 3-31. Expanded and collapsed regions and outlining glyphs.
In addition to regions, ...