The Beauty of Visual Studio Immediate Window
The Visual Studio Immediate Window is a great tool to increase your productivity. A lot of people are not aware that you can test functions in your program without writing any code by using this little tool. Look in the msdn entry for Immediate Window for more information.
Here is an example on how I use it. I have a small function I want to test, and I don’t want to add any testing code for it. Don’t do that for production code, it works great for prototypes only. I start debugging: from the Debug menu->Start Debugging (F5) if you have some breakpoints defined or the best way is with Debug->Step Over (F10), that stops on the first line of Main.
To bring my immediate window, I usually start the Command Window (shortcut Ctrl+Alt+A by default, or go to View->Other Windows->Command Window). In the Command Window, I type immed – which brings the immediate window. Now I start calling my function. And I have IntelliSense and everything I need!
Here are the results: