Erwan Cosnuau Online

Random stuff interesting to share 
« Back to blog

Collapse IF statements (and others) in Visual Studio

Found on http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_23232975.html

Simply use the #region #endregion tags
like:
http://msdn2.microsoft.com/en-us/library/9a1ybwek(VS.71).aspx

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
if (something)
{
#region if_something
if(something else)
{
do something;
}
#endregion
}

Comments (0)

Leave a comment...

 
Got an account with one of these? Login here, or just enter your comment below.
Posterous-login    Connect    twitter