<PackageReference Include="System.Collections.NonGeneric" Version="4.0.1-beta-23409" />

Comparer

public sealed class Comparer : IComparer
Compares two objects for equivalence, where string comparisons are case-sensitive.
public static readonly Comparer Default

Represents an instance of Comparer that is associated with the CurrentCulture of the current thread. This field is read-only.

public static readonly Comparer DefaultInvariant

Represents an instance of Comparer that is associated with InvariantCulture. This field is read-only.

public Comparer(CultureInfo culture)

Initializes a new instance of the Comparer class using the specified CultureInfo.

public int Compare(object a, object b)

Performs a case-sensitive comparison of two objects of the same type and returns a value indicating whether one is less than, equal to, or greater than the other.