Geeks With Blogs
George Mamaladze .NET C# tips, tricks, tweaks. Effective use of data structures and algorithms. Clean code. PLINQ
Parallel Programing, PLINQ and Globalization
I’m going to start with a simple code snippet which sorts an array of strings using LINQ. 1 IEnumerable<string> line = new[] {"Z","A","Ä"}; 2 var result = line.OrderBy(letter => letter); 3 Console.WriteLine("{0}", string.Join(" ", result)); The result might look like this: A Ä Z … or not. It depends on the thread culture the sorting is running in. The string order is culture aware (unlike char order which is culture invariant), so if we switch for instance on one of the Norwegian cultures ......

Posted On Tuesday, August 9, 2011 6:15 AM

Copyright © George Mamaladze | Powered by: