-
StackOverflow 文档
-
sharepoint 教程
-
使用托管客户端对象模型(CSOM)
-
名单。将字段添加到列表中
ClientContext clientContext = new ClientContext(siteUrl);
SP.List oList = clientContext.Web.Lists.GetByTitle("Announcements");
SP.Field oField = oList.Fields.AddFieldAsXml("<Field DisplayName='MyField' Type='Number' />",
true, AddFieldOptions.DefaultValue);
SP.FieldNumber fieldNumber = clientContext.CastTo<FieldNumber>(oField);
fieldNumber.MaximumValue = 100;
fieldNumber.MinimumValue = 35;
fieldNumber.Update();
clientContext.ExecuteQuery();