public int CompareTo(LocatedRef <T> other) { var comparable = Value as IComparable <T>; return(comparable?.CompareTo(other.Value) ?? Comparer <T> .Default.Compare(Value, other.Value)); }
public bool Equals(LocatedRef <T> other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(EqualityComparer <T> .Default.Equals(Value, other.Value)); }