SPListItem​Collection to Linq List

This time you code gives us extension to SPListItemCollection object.

SPListItem​Collection to Linq List

If you want to work with the object of SPListItemCollection using linq - The following code can help

public static List<SPListItem> ToList(this SPListItemCollection items)
{
    IEnumerable<SPListItem> itemsContiens = items.OfType<SPListItem>();
    return itemsContiens.ToList<SPListItem>();
}

Yours...
Roi

Comments

Post a Comment

Popular posts from this blog

A sharepoint list view of the current month

SharePoint Service Provisioning - the service stuck on starting

Export SharePoint 2010 List to Excel with PowerShell