Wednesday, May 18, 2011

Order by with out Culture

If you want to do some operations without any culture you can do with the help of StringCompare.Ordinal or StringCompare.OrdinalIgnoreCase.

void Main()
{
string[] nonCulture = { "äax", "ääü", "äbü" };

IEnumerable orderNonCulture = nonCulture.OrderBy( r => r, StringComparer.Ordinal);

orderNonCulture.Dump();
}

No comments:

Post a Comment