title: Why casting to object when comparing to null?
body: <p>While browsing the MSDN documentations on Equals overrides, one point grabbed my attention.</p>
  
  <p>On the examples of <a href="http://msdn.microsoft.com/en-us/library/ms173147%28VS.80%29.aspx" rel="noreferrer">this specific page</a>, some null checks are made, and the objects are casted to the System.Object type when doing the comparison :</p>
  
  <pre><code>public override bool Equals(System.Object obj)
  {
      // If parameter is null return false.
      if (obj == null)
      {
          return false;
      }
  
      // If parameter cannot be cast to Point return false.
      TwoDPoint p = obj as TwoDPoint;
      if ((System.Object)p == null)
      {
          return false;
      }
  
      // Return true if the fields match:
      return (x == p.x) &amp;&amp; (y == p.y);
  }
  </code></pre>
  
  <p>Is there a specific reason to use this cast, or is it just some "useless" code forgotten in this example ?</p>