예제 #1
0
 public bool Equals(DiffElement <T> other)
 {
     return
         (ElementIndexFromCollection1.Equals(other.ElementIndexFromCollection1) &&
          ElementFromCollection1.Equals(other.ElementFromCollection1) &&
          ElementIndexFromCollection2.Equals(other.ElementIndexFromCollection2) &&
          ElementFromCollection2.Equals(other.ElementFromCollection2) &&
          Operation == other.Operation);
 }
예제 #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = ElementFromCollection1.GetHashCode();
         hashCode = (hashCode * 397) ^ ElementFromCollection2.GetHashCode();
         hashCode = (hashCode * 397) ^ ElementIndexFromCollection1.GetHashCode();
         hashCode = (hashCode * 397) ^ ElementIndexFromCollection2.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)Operation;
         return(hashCode);
     }
 }