Skip to Main Content
Professional Visual Studio® 2008
book

Professional Visual Studio® 2008

by Nick Randolph, David Gardner
July 2008
Intermediate to advanced content levelIntermediate to advanced
1026 pages
27h 59m
English
Wrox
Content preview from Professional Visual Studio® 2008

4.6. Code View

As a developer you're likely to spend a considerable portion of your time writing code, which means that knowing how to tweak the layout of your code and being able to navigate it effectively are particularly important.

4.6.1. Forward/Backward

As you move within and between items, Visual Studio 2008 tracks where you have been, in much the same way that a web browser tracks the sites you have visited. Using the Navigate Forward and Navigate Backward items from the View menu, you can easily go back and forth between files that you are working on. The keyboard shortcut to navigate backward is Ctrl+−. To navigate forward again it is Ctrl+Shift+−.

4.6.2. Regions

Effective class design usually results in classes that serve a single purpose and are not overly complex or lengthy. However, there will be times when you have to implement so many interfaces that your code file will become unwieldy. In this case you have a number of options, such as partitioning the code into multiple files or using regions to condense the code, thereby making it easier to navigate.

The introduction of partial classes means that at design time you can place code into different physical files representing a single logical class. The advantage of using separate files is that you can effectively group all methods that are related, for example, methods that implement an interface. The problem with this strategy is that navigating the code then requires continual switching between code files.

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

Professional Visual Studio® 2010

Professional Visual Studio® 2010

Nick Randolph, David Gardner, Michael Minutillo, Chris Anderson

Publisher Resources

ISBN: 9780470229880Purchase book