Just reading the msdn article on overriding equality operators here

The following snippet confuses me...

// If parameter cannot be cast to Point return false.
TwoDPoint p = obj as TwoDPoint;
if ((System.Object)p == null) // <-- wtf?
{
    return false;
}

Why is there a cast to Object here to perform the null comparison?

Edit
Report