Back to the Future With Visual Basic

Visual Basic takes a different conceptual route, with features including My Visual Basic, IntelliSense, edit and continue, AutoCorrect, Just My Code, and its own implementation of generics. Anyone who has worked in pre-.NET versions of Visual Basic likely remembers edit and continue, which gave you the ability to stop a running application, make a change to the code, and continue execution with the new code. The latest version of Visual Basic reinstates this feature, which provides for fast debugging and what-if analysis during coding.

IntelliSense is not new, of course, but the latest version offers several refinements that will be welcome to many. You can now adjust the level of detail supplied by IntelliSense in the code editor by filtering out the less commonly used members, or by seeing everything that is available. Unfortunately, that is the extent of the filtering available. You can also add IntelliSense code snippets from a library of 380 prewritten pieces of code. Last, IntelliSense will highlight listed methods that cannot be run within the context of the current security sandbox.

Perhaps the best RAD feature is My Visual Basic, or simply My. My provides easy access to information and default object instances that are related to your application. In short, it lets you refer to many things in a simple, object-oriented style familiar to anyone who has been programming in Visual Basic for any period of time. You can retrieve any data to do with the computer, the application, or the user and use it in the application with My.

AutoCorrect provides suggestions for fixing compilation errors. It works similarly to the accursed Smart Tags, in that it underlines an error and offers a pull-down of possible fixes. You can choose one of them, and the fix is applied automatically.

Just My Code is a debugging helper that hides code from system calls and generated sources during debugging. For example, if you run a debug build, Just My Code will create debug symbols for the code you wrote, but not for optimized code from a commercial library. The code with debug symbols is run as My Code, and other code is not, so the debugger will not stop in that code. It should provide for more of a streamlined debugging process, especially for those who use a lot of libraries in their code.

Visual Basic also implements a form of generics, which take on a similar form to those in C#. Like C#, Visual Basic generics are subclassed from the namespace System.Collections.Generic.