Simple way to use LINQ with SharePoint ItemCollections

Here is a simple way to make use of LINQ with SharePoint item collections, for example, with List Items SPListItemCollection listPages = pagesList.Items;var latestPages = listPages.Cast<SPListItem>().Where(p => p.Name != defaultPageName); And this becomes really cool if you use with Dynamic LINQ var latestPages = listPages.Cast<SPListItem>()                                .Where(p => p.Name != defaultPageName)                                .OrderByDescending(p […]