Share via


Code Definition View

Sometimes you want to view the source code for a type that you are working with. No longer will you need to switch between the MSDN documentation, the object browser, and the header files to find information about different types. The new Code Definition window in Visual Studio 2005 now lets you view the available source code for any programmatic element (class, member, etc.) that you click on. As you move the insertion point in the editor, or change the selection in Class View, the Object Browser, or Call Browser, the content of the Code Definition window is updated. If the type is defined in a header file, for example, the IDE displays the header file in the Code Definition window. For types where source code is not available, the definition window will show the type metadata as source. The Code Definition window is a read-only editor window that lets you copy code and set bookmarks and breakpoints. If you want to edit the definition displayed, just right-click on the Code Definition window and select Edit Definition from its shortcut menu.

Viewing the source for the Product class in the Code Definition window