Why StringComparison.Ordinal Is Usually the Right Choice
By Eric
—
—
2 minute read
A question that arose in response to my previous post (about how string comparisons can produce unexpected results when done in a culture-sensitive way) was Which is right, StringComparison.Ordinal or StringComparison.InvariantCulture? The short answer: StringComparison.Ordinal.
There is a good article explaining the differences between the StringComparison enum …