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

CaseInsensitiveComparer

Compares two objects for equivalence, ignoring the case of strings.
public static CaseInsensitiveComparer Default { get; }

Gets an instance of CaseInsensitiveComparer that is associated with the CurrentCulture of the current thread and that is always available.

Gets an instance of CaseInsensitiveComparer that is associated with InvariantCulture and that is always available.

Initializes a new instance of the CaseInsensitiveComparer class using the CurrentCulture of the current thread.

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

public int Compare(object a, object b)

Performs a case-insensitive 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.