using Microsoft.SharePoint.Client;
ClientContext context = new ClientContext("https://quantr.sharepoint.com/dev");
context.Credentials = new SharePointOnlineCredentials("[email protected]", ToSecureString("your password"));
Web web = context.Web;
context.Load(web);
context.ExecuteQuery();
List list = context.Web.Lists.GetByTitle("CustomList1");
ListItemCollection collection = list.GetItems(new CamlQuery());
context.Load(collection);
context.ExecuteQuery();
context.Load(list.EventReceivers);
context.ExecuteQuery();
for (int x = 0; x < list.EventReceivers.Count; x++)
{
Console.WriteLine(list.EventReceivers[x].ReceiverName+" : "+ list.EventReceivers[x].ReceiverUrl);
}
for (int x = 0; x < collection.ToList().Count; x++)
{
Console.WriteLine(collection.ToList()[x]["Title"]);
}
Console.Read();
Post Views: 2,816