title: Two equal IPv6 IPAddress instances return different GetHashCode results
body: <p>I have two clients that create <code>IPAddress</code> instances from the <strong>same</strong> <code>byte[]</code> and send it to the server over WCF (using <code>DataContractSerializer</code>).</p>
  
  <p>On the server, these <code>IPAddress</code> instances are inserted as keys in a dictionary but for some reason they're added as different keys.</p>
  
  <p>When logging I see that they're equal but <code>GetHashCode</code> returns different results. </p>
  
  <pre><code>var client1Address = // sent from client1
  var client2Address = // sent from client2
  
  Console.WriteLine(client1Address.Equals(client2Address));
  Console.WriteLine(client1Address.GetHashCode().Equals(client2Address.GetHashCode()));
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>true
  false
  </code></pre>
  
  <p>How can equal <code>IPAddress</code> instances return different <code>GetHashCode</code> results?</p>