title: Right way to implement GetHashCode for this struct
body: <p>I want to use a date range (from one date to another date) as a key for a dictionary, so I wrote my own struct:</p>
  
  <pre><code>   struct DateRange
     {
        public DateTime Start;
        public DateTime End;
  
        public DateRange(DateTime start, DateTime end)
        {
           Start = start.Date;
           End = end.Date;
        }
  
        public override int GetHashCode()
        {
           // ???
        }
     }
  </code></pre>
  
  <p>What's the best way to implement GetHashCode so no two objects of a differing range will generate the same hash?  I want hash collisions to be as unlikely as possible, though I understand Dictionary&lt;> will still check the equality operator which I will also implement, but didn't want to pollute the example code too much.  Thanks!</p>