SPList.Update 方法

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Sub Update
用法
Dim instance As SPList

instance.Update()
public void Update()

备注

此方法调用与falseUpdate(Boolean)

示例

下面的代码示例使用Update方法修改列表的多个属性。

Imports System
Imports Microsoft.SharePoint

Module ConsoleApp
   Sub Main()
      Using site As SPSite = New SPSite("https://localhost")
         Using web As SPWeb = site.OpenWeb()

            Dim list As SPList = web.GetList("/lists/announcements/")
            list.EnableAttachments = False
            list.EnableSyndication = False
            list.Update()

         End Using
      End Using

      Console.ReadLine()
   End Sub
End Module
using System;
using Microsoft.SharePoint;

namespace Test
{
   class ConsoleApp
   {
      static void Main(string[] args)
      {
         using (SPSite site = new SPSite("https://localhost"))
         {
            using (SPWeb web = site.OpenWeb())
            {
               SPList list = web.GetList("/lists/announcements/");
               list.EnableAttachments = false;
               list.EnableSyndication = false;
               list.Update();
            }
         }
         Console.ReadLine();
      }
   }
}

另请参阅

引用

SPList 类

SPList 成员

Update 重载

Microsoft.SharePoint 命名空间