Comparer.Ordinal

Comparer.Ordinal

Returns a comparer function which uses Ordinal rules to compare values.

function (optional x as nullable any, optional y as nullable any) as number

Description

Returns a comparer function which uses Ordinal rules to compare the provided values x and y.

Category

Comparer

Examples

Using Ordinal rules, compare if "encyclop?dia" and "encyclopaedia" are equivalent. Note these are equivalent using Comparer.FromCulture("en-us").

Comparer.Equals(Comparer.Ordinal, "encyclop?dia", "encyclopaedia")

false