I'm attempting to Create a Document Library from a custom list template using CSOM. Using answers from similar question, I ran the following code but I'm receiving build error CS0200 Property or indexer 'ListTemplate.Name' cannot be assigned to -- it is read only.
using (ClientContext ctx = new ClientContext(siteUrl))
{
Web site = ctx.Web;
ctx.Load(site, s => s.ListTemplates);
ctx.ExecuteQuery();
//create a list
ListCreationInformation info = new ListCreationInformation
{
Title = clientId,
Description = "Client Library",
};
ListTemplate listTemplate = site.ListTemplates.First(lt => lt.Name = "ClientID");
info.TemplateFeatureId = listTemplate.FeatureId;
info.TemplateType = listTemplate.ListTemplateTypeKind;
site.Lists.Add(info);
ctx.ExecuteQuery();
}