Beispiel #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());
     }
 }
Beispiel #2
0
 public bool Equals(WeightedNaiadable <T> other)
 {
     return(this.weight == other.weight && this.payload.Equals(other.payload));
 }