Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

struct System.​Collections.​IComparer

Assembly: System.Runtime

Exposes a method that compares two objects.

Methods

public int
Compare​(object x, object y)
x The first object to compare.
y The second object to compare.
Returns A signed integer that indicates the relative values of <paramref name="x" /> and <paramref name="y" /> : <br /> - If less than 0, <paramref name="x" /> is less than <paramref name="y" /> . <br /> - If 0, <paramref name="x" /> equals <paramref name="y" /> . <br /> - If greater than 0, <paramref name="x" /> is greater than <paramref name="y" /> .
Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.