How to: Work with Class View
You can navigate from the Code Editor to Class View to examine object members and project references. You can also navigate from Class View to lines of code where symbols are defined, referenced, and used.
Each symbol is represented by an icon indicating its type. To view a brief description of any symbol, hover over its icon. To expand a symbol and display its members, click the empty triangle symbol next to the icon or press the add (+) key on the numeric keypad.
In Visual C#, certain symbols, when selected, display their properties in the Properties window. These properties can be viewed and edited.
To select multiple symbols simultaneously in Class View, press the SHIFT and CTRL keys as you click on them. This allows you to drag and drop groups of symbols.
As you edit your code, Class View updates its contents automatically to reflect the changes. As a result, you can select any symbol in the Code Editor and locate it instantly in the Class View hierarchy for the document you are editing.
To Synchronize Class View with the Code Editor
Open a code document for editing in the Code Editor.
Select Class View from the View menu to display the Class View window.
Right-click on a symbol in Class View and select Find All References from its shortcut menu.
In the Find Symbol Results window, double-click an entry to locate an instance of the symbol in your code.
Place the cursor in the line of code that includes the instance of the symbol, and then press CTRL-D.
The Find box on the Standard toolbar is selected.
In the Find box, type the following text:
Class View automatically scrolls to the location of the selected symbol in its hierarchy.
Class View provides several commands for navigating to definitions of symbols and their uses in code (references). You can navigate to symbols defined in your code by double-clicking them. The source file opens in the Code Editor and scrolls to the definition or declaration. If a symbol is defined elsewhere, its declaration is displayed in the Object Browser.
To navigate to a definition or declaration
Double-click the symbol.
Right-click the symbol and then choose either Go To Definition or Go To Declaration.
To browse a definition
Right-click the symbol and choose Browse Definition.
The Object Browser is displayed with the symbol selected. Its declaration appears in the Description pane.
To navigate to a reference
Right-click the symbol and choose Go To Reference.
The source file containing the reference opens in the Code Editor, with the insertion point placed at the reference.
References might not be available for all project types.