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