
Hi @Puneeth, C ,
You can refer to the following code to iterate over a sharepoint ListItemCollection
using (ClientContext clientContext = new ClientContext("http://MyServer/sites/MySiteCollection"))
{
List targetList = clientContext.Web.Lists.GetByTitle("List Name");
CamlQuery oQuery = CamlQuery.CreateAllItemsQuery();
ListItemCollection oCollection = targetList.GetItems(oQuery);
clientContext.Load(oCollection);
clientContext.ExecuteQuery();
foreach (ListItem oItem in oCollection)
{
Console.WriteLine(oItem["Title"].ToString());
}
}
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.