I get the following watch message:
tsSource[j].Text.ToUpper() This expression causes side effects and will
not be evaluated string
The Text is &Edit
Do you know what are the side effects?
There probably aren't any in this case, but the debugger is not smart
enough
to be able to tell - so it prefers to err on the safe side.
Quoting from
http://msdn2.microsoft.com/en-us/library/a7a250bs.aspx :
"A side effect occurs when evaluating an expression changes the value of
data
in your application.
Side effects are something to watch for if you are evaluating expressions
in
the debugger. If you evaluate an expression in the Watch window or the
QuickWatch dialog box and the expression has side effects, you might
change
the value of variables in another part of your program without realizing
it.
Side effects can make debugging more difficult by creating the appearance
of
bugs where none exist or masking the appearance of real bugs.
One common cause of side effects is evaluating a function call in a
debugger
window. Such evaluations are usually noticeable. A more subtle cause of
side
effects is the evaluation of properties and other implicit function calls
in
managed code.
The debugger cannot tell whether a property evaluation or implicit
function
call has side effects. Therefore, by default, the debugger does not
evaluate
implicit function calls automatically. Property evaluation is allowed by
default, but can be turned off in the Options dialog box. When a function
call
or property has not been evaluated, a refresh icon appears. You can
manually
evaluate the expression by clicking the refresh icon. For details, see How
to:
Refresh Watch Values."
Regards,
Gilles.