According to Microsoft: "The Immediate window is used at design time to debug and evaluate expressions, execute statements, print variable values, and so forth."
Notice it says "at design time". I have read other statements on the web to this effect as well.
However, when anybody asks why they get the "The expression cannot be evaluated while in design mode." error, everybody always states that it only works in debug mode.
I can understand some things will not work in design mode when they reference items like textbox box values. But I really don't understand why I have to set a breakpoint, run my application, and wait for it to get to the breakpoint, just to find out what 1 + 1
is.
I admit to frustration as I'm coming from Visual Basic 6.0. There I can print 1 + 1
and get 2
while in design mode. I can also call public functions and get answers while in design mode.
All of this comes from my looking for answers to type converting. Since I couldn't find an answer on the web, I decided the quickest and easiest way was to just test some statements REAL QUICK in the immediate window to see which one worked.
Is .NET a step backwards when using the immediate window?