C# - null vs "Could not evaluate expression"

Posted by Vaccano on Stack Overflow See other posts from Stack Overflow or by Vaccano
Published on 2010-04-21T21:01:17Z Indexed on 2010/04/21 21:03 UTC
Read the original article Hit count: 1336

I have code like this:

    private Box mCurBox;

    public Box CurBox
    {
        get { return mCurBox; }
        set
        {
            if (mCurBox != value)
            {
                mCurBox = value;
            }
        }
    }

When mCurBox is null then CurBox the debugger says "Could not be evaluated". If it knows that the value underneath is null then how come it can't figure it out?

© Stack Overflow or respective owner

Related posts about c#

Related posts about visual-studio