Example #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(StopID.GetHashCode() + Name.GetHashCode());
     }
 }
Example #2
0
 // We should override GetHashCode() here too since
 // if Equals() returns true for a pair of objects then
 // GetHashCode() must return the same value for these objects
 public override int GetHashCode()
 {
     //Get hash code for the StopID field since that's our basis for comparison.
     return StopID.GetHashCode();
 }