Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Outlining IF-ELSE code block in Visual Studio 2010

Wondering if there is anyway way to expand/collapse the IF-ELSE code block in VS2010? Sometimes the code inside IF-ELSE is too long and I would like to hide it.

Anyway one know? Thanks a lot!

EDIT: Please be informed that I'm using #region & #endregion inside the IF-ELSE statement. Try looking for more convenient style like JScript extension does.

like image 739
nonintanon Avatar asked Jan 12 '11 13:01

nonintanon


1 Answers

Go to the Options dialog box and select Text Editor, expand C/C++, and then click Formatting. Activate "Automatic outlining of statement blocks."

Source: http://msdn.microsoft.com/en-us/library/0x6hx0kx.aspx

I'm using the full version of Visual Studio 2010, don't know if this is available in the express version.

like image 184
newenglander Avatar answered Oct 13 '22 01:10

newenglander