title: sharepoint 2013 create document library using List Template C#
body: <p>It is possible to used a <strong>list template</strong> to create new document library, I am trying following code but its is not working.it just create library without using template.</p>
  
  <pre><code>ListTemplateCollection listTemplates1 = context.Site.GetCustomListTemplates(context.Web);
  ListTemplate li1;//
  context.Load(listTemplates1);
  context.ExecuteQuery();
  context.Load(site.ListTemplates);
  context.ExecuteQuery();
  
  var listTemplate = listTemplates1.First(lt =&gt; lt.Name == "&lt;Test&gt;");
  
  ListCreationInformation li = new ListCreationInformation();
  li.Title = "XYZZ2";
  li.Description = "Created through Code";
  li.TemplateFeatureId = listTemplate.FeatureId;
  li.TemplateType = listTemplate.ListTemplateTypeKind;
  List newList = context.Web.Lists.Add(li);
  context.Load(newList);
  context.ExecuteQuery();
  </code></pre>