title: In .NET 4.0, What is the default implementation of Equals for value types?
body: <p>The two documentation pages seem to contradict on this topic:</p>
  
  <ul>
  <li><a href="http://msdn.microsoft.com/en-us/library/2dts52z7%28v=vs.100%29.aspx">ValueType.Equals Method</a>  says "The default implementation of the Equals method <strong>uses reflection</strong> to compare the corresponding fields of obj and this instance."</li>
  <li><a href="http://msdn.microsoft.com/en-us/library/bsc2ak47%28v=vs.100%29.aspx">Object.Equals Method (Object)</a>  says "The default implementation of Equals supports reference equality for reference types, and <strong>bitwise equality for value types</strong>."</li>
  </ul>
  
  <p>So is it bitwise equality or reflection?</p>
  
  <p>I took a glimpse at the source code of <code>ValueType</code> and found a comment saying</p>
  
  <blockquote>
    <p>// if there are no GC references in this object we can avoid reflection</p>
    
    <p>// and do a fast memcmp </p>
  </blockquote>
  
  <p>Can someone clarify what "GC reference" means? I guess it's a field having a reference type but I'm not sure.</p>
  
  <p>If I create a <code>struct</code> which only has value type fields, will the instances of it be always compared the fast way?</p>
  
  <p><strong>UPDATE:</strong> The documentation for.Net 4.5 has been significantly improved: it is free from the mentioned contradiction and now gives a better understanding how the default value type equality checking works.</p>