In C #, you can compare two strings with String.Equals and put StringComparison .
I recently tried to update my archaic ToLower() comparison method, because I read that it does not work in all languages āā/ cultures.
From what I can tell, comparison types are used to determine the order when I come across a list containing aƩ and ae , which should be displayed first (some cultures arrange things differently).
With String.Equals ordering doesn't matter. Therefore, is it possible to assume that many of the options are irrelevant, and only the [Ordinal] and [Ordinal] IgnoreCase are important?
MSDN article for String.Equals says
The compareType parameter specifies whether the comparison should use the current or invariant culture, to honor or ignore the case of comparing two lines, or to use the rules for sorting by word or ordinal order.
string.Equals(myString, theirString, StringComparison.OrdinalIgnoreCase)
I am also interested to know how the sorting method works internally, does it String.Compare to determine the relative position of two strings?
Nibblypig
source share