While developing windows/web – application using Visual Studio, several times we need to collapse/expand the code blocks/regions for clear reading and easy to manage the whole page of code. We do it by clicking the +/- sign on the left of the start of code block. But, when there is a good no. of code blocks/sections/regions then clicking each +/- sign is difficult. If the code blocks are large in size i.e, contain many lines of code then practically it is again a hard task to manage the code.
This difficulty can be avoided if we use following shortcuts –
1. CTRL + M + M —–> Collapse/Expand current section
2. CTRL + M + O —–> Collapse all regions
3. CTRL + M + L —–> Expand all regions
You may also like-