Design-Time Expression Evaluation

Using the Immediate window, you can test and debug your functions and methods without having to compile and run your application. This feature, called design-time expression evaluation, is one of the great benefits of the new Visual Studio 2005 hosting model. It's useful to be able to call Framework methods and user-defined methods from within the Immediate window. You can evaluate expressions, execute statements, print variable values, test methods, and debug code, all without leaving the design time environment. You can call code you've written yourself while in design mode, even if the code is inside a form's class.

If you are familiar with Visual Basic 6, you will recognize and appreciate design-time expression evaluation, which is now supported Visual Basic 2005 as well as Visual C# and Visual J#. To display the Immediate window, open a project for editing, then choose Windows from the Debug menu and select Immediate.

Visual Studio 2005 allows you to perform calculations in the Immediate window at design-time.