I wrote a little code where declare a string array and i try to order it with and without stringCompare, but the result always same.
With StringComparer where i use cultureInfo:
var strings = new string[] { "asd", "ásd", "álm", "alm" };
var ci = CultureInfo.GetCultureInfo("hu");
var comp = StringComparer.Create(ci, false);
Console.WriteLine(string.Join(", ", strings.OrderBy(item => item, comp)));
Without StringComparer:
var strings = new string[] { "asd", "ásd", "álm", "alm" };
Console.WriteLine(string.Join(", ", strings.OrderBy(item => item)));
Both result is:
alm, álm, asd, ásd
But the correct result will be:
alm, asd, álm, ásd
What do I do wrong?