public int CompareTo(PriorityValue <T> other) { float comp = Priority - other.Priority; if (comp > 0) { return(-1); } if (comp < 0) { return(1); } return(0); }
public bool Equals(PriorityValue <T> other) { return(Priority == other.Priority && EqualityComparer <T> .Default.Equals(Value, other.Value)); }