Skip to Main Content
Visual Studio Hacks
book

Visual Studio Hacks

by James Avery
March 2005
Intermediate to advanced content levelIntermediate to advanced
304 pages
19h 23m
English
O'Reilly Media, Inc.
Content preview from Visual Studio Hacks
Collapse and Expand Your Code #97
Chapter 13, Enhancing Visual Studio
|
437
HACK
HACK
#97
Collapse and Expand Your Code Hack #97
Collapsing and expanding regions can be fun, but there’s a free add-in that
lets you do the same with If, Try, and With statements.
Classify is a Visual Studio .NET add-in that exposes a new toolbar and new
context sensitive menu items when editing source code. Classify is largely
compatible with C#, though some features are currently specific to Visual
Basic .NET. Classify can be downloaded from http://www.visualstudiohacks.
com/classify.
The goal of the add-in is to simplify basic coding tasks and to assist in the
common aim of any good programmer, which is to make code readable and
maintainable.
To assist with readability, Visual Studio .NET has a feature that enables you
to collapse, or temporarily hide, sections of code. However, by default, this
behavior applies only to basic code blocks like regions, subroutines, and
enumeration blocks. What Classify does, for Visual Basic .NET, is take this
to the next level.
Auto-Collapse and Scan-Collapse are very similar features, in that they col-
lapse code. Auto-Collapse is invoked at will by the user in each location
where code is to be hidden. Scan-Collapse automatically scans the current
source file and collapses all sections of code that the programmer is likely to
want to collapse.
For example, imagine that you have a subroutine ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft Visual Studio 2015 Unleashed, Third Edition

Microsoft Visual Studio 2015 Unleashed, Third Edition

Mike Snell, Lars Powers
.Net Framework Essentials

.Net Framework Essentials

Thuan L. Thai, Hoang Lam
C# 5.0 Unleashed

C# 5.0 Unleashed

Bart De Smet
Programming .NET Security

Programming .NET Security

Adam Freeman, Allen Jones

Publisher Resources

ISBN: 0596008473Errata Page