Did you know? IntelliSense Everywhere (Lisa Feigenbaum)

Lisa Feigenbaum

I’ve decided to start a “Did you know?” series with tips & tricks. First off is my favorite IDE feature in VB2008: IntelliSense Everywhere! Did you know about all the new places where you can now find intelliSense in VB2008? If you’re like me, once you try 2008 IntelliSense you won’t be able to go back to 2005.

VB’s mission statement is to be the most productive tool for building .NET-connected applications. The VB IDE tools certainly support this point, with intelliSense in particular. Here’s a list of ways that intelliSense can make you more productive:

  • Faster typing: IntelliSense word completion helps you to save keystrokes.
  • Fewer errors: IntelliSense prevents coding errors by presenting valid options for the current context.
  • Less search time: IntelliSense saves you time by showing valid member names in a list.
  • Discoverability: IntelliSense helps you figure out what to code next by showing what’s available.

But rather than listening to me tell you why it’s so great, wy don’t you try it out yourself? See the list of categories and images below, of all the new places where you can find VB IntelliSense in VS 2008.

KEYWORDS

At the file level…

Look at all that Visual Basic language help right in the IDE! Who needs to F1 anymore? 🙂 j/k

Look at all that help on the Visual Basic language, right in the IDE! Who needs to F1 anymore? :) j/k

At the declaration level…

Save time typing all those *long* keywords in the Visual Basic language!

Use IntelliSense to write error-free declarations. For example, properties cannot be declared at the file level. (If you tried to declare one there, you would get a compiler error.) Thus, when you invoke intelliSense at the file level, “Property” will not appear in the list:

However, properties *are* allowed at the class level, so if you try to declare a property within a class, the keyword *will* appear in the list:

 

Mid-line verification works as well. For example, properties cannot be declared “MustInherit”. Thus if I type MustInherit and then invoke the list again, “Property” will no longer appear:

 

IntelliSense is a great tool here, to help you write grammatically correct code! It eliminates the extra burden of having to keep all these rules in your head.

At the method level…

As you probably expect by now, keyword intelliSense works here too! Here are just a couple examples:

 

 

IDENTIFIERS (NAMES OF VARIABLES, METHODS, TYPES, ETC.)

At the beginning of the line…

IntelliSense now appears at the beginning of a line. The example above showed keywords in the IntelliSense list at the beginning of a line within a method-body. However, identifiers appear there too. Here are a couple examples…

You can now use intelliSense to remember your method names:

 

Assigning various members off an instance isn’t so tedious anymore, when you don’t have to keep typing out the instance name! (see below)

 

 In an expression…

There are *many* expression contexts in the Visual Basic language, and now you can enjoy enhanced IntelliSense support in *all* of them. Below are some examples.

After Equals:

After a binary operator:

Argument to a function call:

After Return + Space in a function. (Don’t worry about remembering all your local variable names when writing the Return statement for your function anymore – IntelliSense will do the remembering for you.)

Within a statement:

Etc., etc., etc. There are so many places where the new VS2008 intelliSense appears, that it is not possible to detail them all… But I hope this this list will give you an idea.

Happy coding!

0 comments

Leave a comment

Feedback usabilla icon