You can download the sample project for the article here. ComplexLinqSort.zip (259.64 kb) In my previous post we discussed on sorting the list / collection using dynamic lambda expression for properties. In this article we will see how to sort on complex properties. So what is a complex property. Consider the class diagram as shown […]
Tip: Update Collection / List Property Using Linq
If you hate doing a for loop or for each loop just to update a property in your list / collection object, below is how you can do it using Linq in a single statement. list.ForEach(item => list.Description = “Hello”);
Whats New In Windows Phone Mango
As we all are aware that Windows Phone 7 is a huge success in the market, and Microsoft is really committed to keep the bar raising with every release. Windows Phone Mango will be the next major release in the smart phone market. Though there are multiple unanswered questions we have at this moment, there […]
Sort Generic List Using Lambda Expression For Dynamic Type And Dynamic Property
I once stuck on a requirement where I needed to write a code which is flexible and generic enough to sort any type of collection and also the property based on which it has to be sorted will be dynamic. After trying many options I discovered myself how easy it is to hit this requirement […]
Getting Added And Deleted Items In A List Using LINQ
Most the time when we work with a list object, finding a newly added items or deleted items becomes a very trivial part of the logic. Sometimes, we endup writing sophisticated logic or loops to get this done. Below code will demonstrate how this can be easily done using LINQ. Lets assume that we have […]