George Mamaladze

.NET C# tips, tricks, tweaks. Effective use of data structures and algorithms. Clean code.
posts - 11, comments - 15, trackbacks - 0

My Links

News

Archives

Post Categories

All

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 09, 2011 6:15 AM | Feedback (0) | Filed Under [ C# Language .NET Framework PLINQ ]

Powered by: