Error while casting the object

  • Thread starter Thread starter Kodnil
  • Start date Start date
K

Kodnil

Guest
hello guys,

I am getting below error while casting the object:

Unable to cast object of type 'WhereListIterator`1[Microsoft.SharePoint.Client.ListItem]' to type 'Microsoft.SharePoint.Client.Folder'.


code looks like :

List<ListItem> items = new List<ListItem>();
....
....
var filteritems = (Microsoft.SharePoint.Client.Folder)items.Where(tt => tt.FieldValues["FileRef"].ToString().Equals(Request.QueryString["FolderName"], StringComparison.CurrentCultureIgnoreCase));

Continue reading...
 
Back
Top