Creating a List from Custom List Template in SharePoint 2013

  1. using(ClientContext ctx = new ClientContext("http://mysite/"))  
  2. {  
  3.       ListTemplateCollection ltc = ctx.Web.ListTemplates;  
  4.       ctx.Load(ltc);  
  5.       ctx.ExecuteQuery();  
  6.       ListTemplate listTemplate=null;  
  7.       foreach (ListTemplate lT in ltc)  
  8.       {  
  9.             if(lt.Name.Equals("My Custom List Template"))  
  10.             {  
  11.                   listTemplate = lT;  
  12.             }  
  13.       }  
  14.       ListCreationInformation lc = new ListCreationInformation();  
  15.       lc.Title = "EmployeeList";  
  16.       lc.TemplateType = listTemplate.ListTemplateTypeKind;  
  17.       lc.Description = "This holds employee information";  
  18.       List newList = ctx.Web.Lists.Add(lc);  
  19.       ctx.ExecuteQuery();  
  20. }