Jon Skeet [C# MVP] <sk***@pobox.com> wrote in
news:MP************************@msnews.microsoft.c om:
That doesn't disturb me *too* much - basically the JIT doesn't make as
many optimisations when it's running in the debugger. (I suspect if you
ran the debug code outside the debugger, you'd see the same as with the
release code.)
No. I run the debug release outside the debugger all the time.
Never saw it.
Seems like if it's wrong, it should be wrong in both modes.
Or am I just being naive?
While I can see how that would be desirable, it would have unpleasant
side effects - people would be confused when stepping through code to
find the type initialiser run at the start of a method rather than when
the type is first used, for instance. Maybe it would be better to
educate people than to hide that from them though...
I doubt that would be all that confusing. Certainly something
people would learn and understand.
In that regard, it would help the education process along.
And would be much less confusing than having an application that
behaves differently owing only to the change in compilation mode.
This time I was lucky - the application crashed immediately.
Much worse are the ones that don't fail outright, but just produce
subtly incorrect results that may or may not be noticed...