Monthly Archives: March 2009

Custom sorting order in LINQ (ORDER BY WEIGHTING)

I have developed a C# LINQ extension method to allow very flexible ordering by assigning weightings to the sort keys of the elements to be ordered. I was inspired by the functionality offered by SQL Server’s ORDER BY CASE WHEN: The extension method I have created lets you pass a lambda function which allows the [...]

Posted in General | Tagged , | 6 Comments