Пример #1
0
 public int Compare(WeightedNaiadable <T> x, WeightedNaiadable <T> y)
 {
     if (x.weight != y.weight)
     {
         return(x.weight - y.weight);
     }
     else
     {
         return(x.GetHashCode() - y.GetHashCode());
     }
 }
Пример #2
0
 public bool Equals(WeightedNaiadable <T> other)
 {
     return(this.weight == other.weight && this.payload.Equals(other.payload));
 }