看代码:
private void SetListReadOnly(bool isReadOnly,String _listID, String _listVersion){if (string.IsNullOrEmpty(_listID) || string.IsNullOrEmpty(_listVersion))this.InitListInfo();string updateFields =@"";updateFields = string.Format(updateFields, isReadOnly.ToString());XmlDocument doc = new XmlDocument();doc.LoadXml(updateFields);XElement result = XElement.Parse(_ws.UpdateList(_listID, null, null, doc.DocumentElement, null, _listVersion).OuterXml);_listVersion =result.Elements().Where(el => el.Name.LocalName == "ListProperties").First().Attribute("Version").Value;}