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

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters

Export SharePoint 2010 List to Excel with PowerShell