Yes, you are looking for IComparable<T> and IComparer<T> - the latter is the equivalent of the Comparator<E> interface in Java.
If you want to add a comparison to the Point class itself, make Point implementation of IComparable<Point> (and possibly not a common IComparable interface). If you want to implement the comparison elsewhere, run another IComparer<Point> class.
For equality, .NET also has IEquatable<T> and IEqualityComparer<T> . They are used for things like key comparisons in Dictionary<,> .
As an additional note, I highly recommend that you do not have public fields, and you might want to make readonly variables. (Optional types are generally easier to reason with.) You can also make Point a struct , not a class .
source share