16.1. IntelliSense Explained

IntelliSense is the general term for automated help and actions in a Microsoft application. The most commonly encountered aspect of IntelliSense is those wavy lines you see under words that are not spelled correctly in Microsoft Word, or the small visual indicators in a Microsoft Excel spreadsheet that inform you that the contents of the particular cell do not conform to what was expected.

Even these basic indicators enable you to quickly perform related actions. Right-clicking a word with red wavy underlining in Word will display a list of suggested alternatives. Other applications have similar features.

The good news is that Visual Studio has had similar functionality for a long time. In fact, the simplest IntelliSense features go back to tools such as Visual Basic 6. The even better news is that Visual Studio 2008 has IntelliSense on overdrive, with many different features grouped under the IntelliSense banner. From visual feedback for bad code and smart tags for designing forms to shortcuts that insert whole slabs of code, IntelliSense in Visual Studio 2008 provides greatly enhanced opportunities to improve your efficiency while creating applications.

16.1.1. General IntelliSense

The simplest feature of IntelliSense gives you immediate feedback about bad code in your module listings. Figure 16-1 shows one such example, in which an unknown data type is used to instantiate an object and then a second line of code tries to set a property. Because ...

Get Professional Visual Studio® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.