Datasheet
34
❘
CHAPTER 1 VISUAL STUDIO 2010
are unfamiliar with Visual Studio might just assume that “ productivity ” refers to organizing and starting
projects. Certainly, as shown by the project templates and project settings discussed so far, this is true, but
those features don ’ t speed your development after you ’ ve created the project.
This section covers three features that target your productivity while writing code. They are of differing
value and are specifi c to Visual Studio. The fi rst, IntelliSense, has always been a popular feature of
Microsoft tools and applications. The second feature, code expansion, is another popular feature available
since Visual Studio 2005: It enables you to type a keyword, such as “ select, ” and then press the Tab key to
automatically insert a generic select - case code block, which you can then customize. Finally, going beyond
this, you can use the right mouse button and insert a code snippet at the location of your mouse click. As
you can tell, each of these builds on the developer productivity capabilities of Visual Studio.
IntelliSense
IntelliSense has been enhanced in Visual Studio 2010. Early versions of IntelliSense required you to fi rst identify a
class or property in order to make uses of the IntelliSense feature. Beginning with Visual Studio 2008, IntelliSense
is activated with the fi rst letter you type, so you can quickly identify classes, commands, and keywords that you
need. This capability continues with Visual Studio 2010, but the IDE team worked hard to enhance IntelliSense
performance so that it won ’ t sometimes feel like the IDE is trying to keep up with your typing.
Once you ’ ve selected a class or keyword, IntelliSense continues, enabling you to not only work with the
methods of a class, but also automatically display the list of possible values associated with an enumerated
list of properties when one has been defi ned. IntelliSense also provides a ToolTip - like list of parameter
defi nitions when you are making a method call.
Figure 1 - 17 illustrates how IntelliSense becomes available with the fi rst character you type. Note that the drop -
down window has two tabs on the bottom; one is optimized for the items that you are likely to want, while
the other shows you everything that is available. In addition, IntelliSense works with multiword commands.
For example, if you type Exit and a space, IntelliSense displays a drop - down list of keywords that could
follow Exit. Other keywords that offer drop - down lists to present available options include Goto, Implements,
Option, and Declare. In most cases, IntelliSense displays more ToolTip information in the environment than in
past versions of Visual Studio, and helps developers match up pairs of parentheses, braces, and brackets.
FIGURE 1 - 17
CH001.indd 34CH001.indd 34 4/5/10 11:56:49 AM4/5/10 11:56:49 AM