Visual Studio: Hide Selection
Posted
Mon, Aug 9 2010 23:12
by
Deborah Kurata
Sometimes you just want to focus on a specific piece of code and you want the rest of it just out of your way. With Visual Studio 2010, you can hide any piece of code in your application using the new Hide Selection feature.
For example, here is a piece of code in a SaveItem method:
It would be easier to figure out the logic in this routine if you could hide some of the detail. So select the lines you want to hide, right-click, and select Outlining | Hide Selection as shown below.
The selected code lines are then hidden from view and replaced with a ellipsis (...). [Circled in red below for emphasis.]
Use the + sign to the left of the ellipsis to open or close the selection.
Take advantage of this feature any time you want to hide away code so you can focus on the lines that matter.
Enjoy!