Hi,
i need to get the DataTable from the ListItemCollection using CSOM.
Currently i am doing with foreach loop to get the DataTable but i have more than 40 fields so how can i get DataTable directly from the ListItemCollection
Below is the current code:
foreach (ListItem item in itemCollection)
{
DataRow dr = dt.NewRow();
dr["field1"] = Convert.ToString(item["field1"]);
dr["field2"] = Convert.ToString(item["field2"]);
dt.Rows.Add(dr);
}
in SharePoint 2010 we can perform the same using SPListItemCollection.GetDataTable(),i need similar to this in SharePoint 2013 CSOM.
Thanks in advance.
Suresh T G