Partager via


SPList.Update - Méthode

Met à jour la base de données avec les modifications apportées à la liste.

Espace de noms :  Microsoft.SharePoint
Assembly :  Microsoft.SharePoint (dans Microsoft.SharePoint.dll)

Syntaxe

'Déclaration
Public Sub Update
'Utilisation
Dim instance As SPList

instance.Update()
public void Update()

Remarques

This method calls Update(Boolean) with false.

Exemples

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

Voir aussi

Référence

SPList classe

SPList - Membres

Update - Surcharge

Microsoft.SharePoint - Espace de noms