Salsomaggiore Terme (Programmazione) - 22/01/2015 - - Written by
Visual Studio chiudere una sezione di codice
Ecco le combinazioni di tasti in Visual Studio 2012 per poter chiudere / aprire una sezione di codice (if, function, void).

Ctrl + M + O chiude tutte le sezioni (will collapse all)
Ctrl + M + L apre tutte le sezioni (will expand all)

Fonte Visual Studio - Command to collapse all sections of code?

By default, all text is displayed in the Code Editor, but you can choose to hide some code from view. The Code Editor lets you select a region of code and make it collapsible, so that it appears under a plus sign (+).

Click the plus sign (+) next to the symbol to expand or hide the region. Outlined code is not deleted, it is hidden from view.

The Undo and Redo commands on the Edit menu affect these actions. In other words, if you create a collapsible region, you can choose Undo to reverse that action. Also, Copy, Cut, Paste, and drag-and-drop operations retain outlining information, but not the state of the collapsible region. For example, when you copy a region that is collapsed, the Paste operation will paste the copied text as an expanded region.

After outlining code, you can expand the sections you want to work on, collapse them when you are done, and then move to other sections. When you are through outlining, you can use the Stop Outlining command to remove the outline information without disturbing your underlying code.

How to: Outline and Hide Code
Altri articoli che potrebbero interessarti
© MrPaloma 2021 - Viaggi - Foto -