SPList.Update method

Updates the database with changes that are made to the list.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Sub Update
'Usage
Dim instance As SPList

instance.Update()
public void Update()

Remarks

This method calls Update(Boolean) with false.

Examples

The following code example uses the Update method to modify several properties of a list.

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();
      }
   }
}

See also

Reference

SPList class

SPList members

Update overload

Microsoft.SharePoint namespace