16.3. Extended IntelliSense

In addition to these aspects of IntelliSense, Visual Studio 2008 also implements extended IDE functionality that falls into the IntelliSense feature set. These features are discussed in detail in other chapters in this book, as referenced in the following discussion, but this chapter provides a quick summary of what's included in IntelliSense.

16.3.1. Code Snippets

Code snippets are sections of code that can be automatically generated and pasted into your own code, including associated references and Imports statements, with variable phrases marked for easy replacement. To invoke the Code Snippets dialog, press Ctrl+K, Ctrl+X. Navigate the hierarchy of snippet folders (shown in Figure 16-14) until you find the one you need. If you know the shortcut for the snippet, you can simply type it and press Tab, and Visual Studio will invoke the snippet without displaying the dialog. In Chapter 17, you'll see just how powerful code snippets are.

Figure 16.14. Figure 16-14

16.3.2. XML Comments

XML comments were discussed in Chapter 9 as a way of providing automated documentation for your projects and solutions. However, another advantage to using XML commenting in your program code is that Visual Studio can use it in its IntelliSense engine to display tooltips and parameter information beyond the simple variable-type information you see in normal user-defined classes.

A warning for VB.NET developers: Disabling the generation of XML documentation during compilation will also limit your ability to generate the XML comments in your code.

16.3.3. Adding Your Own IntelliSense

You can also add your own IntelliSense schemas, normally useful for XML and HTML editing, by creating a correctly formatted XML file and installing it into the Common7Packagesschemasxml sub-folder inside your Visual Studio installation directory (the default location is C:Program FilesMicrosoft Visual Studio 9.0). An example of this would be extending the IntelliSense support for the XML editor to include your own schema definitions. The creation of such a schema file is beyond the scope of this book, but you can find schema files on the Internet by searching for "IntelliSense schema in Visual Studio."

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.252.204