Skip to content

Instantly share code, notes, and snippets.

@MaxMelcher
Created April 15, 2015 13:44
Show Gist options
  • Save MaxMelcher/27ff455f3fd7f34c3791 to your computer and use it in GitHub Desktop.
Save MaxMelcher/27ff455f3fd7f34c3791 to your computer and use it in GitHub Desktop.
using (var ctx = new ClientContext("https://intranet.demo.com/sites/test"))
{
var web = ctx.Web;
var list = web.Lists.GetByTitle("Documents");
ListItemCreationInformation lici = new ListItemCreationInformation
{
UnderlyingObjectType = FileSystemObjectType.Folder,
LeafName = "TEST-CSOM"
};
var item = list.AddItem(lici);
item.Update();
web.Context.Load(item);
web.Context.ExecuteQuery();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment