Skip to content

Ordinal in String.Equals in C# #144

Answered by christiannagel
ShervanN asked this question in Q&A
Discussion options

You must be logged in to vote

Sorting strings depends on the culture. The table in the following link gives the order for the value cote, coté, côte, côté, Namibia... with English-US, French-France, and Spanish-Spain:

Sort order sample table

Using different cultures, the sort order not only depends on special characters as shown in the previous table, but there are also differences how some ASCII characters are sorted. One language I came across had the same sort order for two different characters, thus here the next character was important how a string was sorted.

With ordinal sort rules, also binary was mentioned. This gives a hint. Here the sort is done based on the binary number value.

For whom are you sorting str…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ShervanN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants