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.​IStructuralComparable
Assembly: System.Runtime
Supports the structural comparison of collection objects.
Methods
public
int
CompareTo​(object other,
IComparer comparer)
other
The object to compare with the current instance.
comparer
An object that compares members of the current collection object with the corresponding members of <paramref name="other" /> .
Returns A signed integer that indicates the relationship of the current collection object to <paramref name="other" /> in the sort order: <br /> - If less than 0, the current instance precedes <paramref name="other" /> . <br /> - If 0, the current instance and <paramref name="other" /> are equal. <br /> - If greater than 0, the current instance follows <paramref name="other" /> .
<list type="table">
<listheader>
<term> Return value</term>
<description> Description</description>
</listheader>
<item>
<term> -1</term>
<description> The current instance precedes <paramref name="other" />.</description>
</item>
<item>
<term> 0</term>
<description> The current instance and <paramref name="other" /> are equal.</description>
</item>
<item>
<term> 1</term>
<description> The current instance follows <paramref name="other" />.</description>
</item>
</list>
Determines whether the current collection object precedes, occurs in the same position as, or follows another object in the sort order.