IStructuralComparable interface supports structural comparison of collection objects. This interface was introduced in .NET 4. Following is the syntax −
public interface IStructuralComparable
It has a single method −
CompareTo(Object, IComparer) − It determines the current collection object in sort Before, at the same position, or after another object in the sequence.
compareTo() method determines whether the current collection object is less than, equal to, or greater than the second object in the sort order.
Explicit implementations of the IStructuralComparable interface are provided by −
The above is the detailed content of In C#, what is the interface IStructuralComparable used for?. For more information, please follow other related articles on the PHP Chinese website!