我创建了一个SP.List项"lst".我也:
lst.ContentTypesEnabled = true;
lst.Update();
clientContext.ExecuteQuery();
Run Code Online (Sandbox Code Playgroud)
我搜索了AvailableContentTypes并找到了我要添加到lst的那个.然后我:
SP.ContentTypeCollection lstTypeCollection = lst.ContentTypes;
Run Code Online (Sandbox Code Playgroud)
......现在我被卡住了.
我lstTypeCollection.Add()想要一个ContentTypeCreationInformation物体,我在黑暗中徘徊.
你能摆脱光明吗?提前致谢 :-)