Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

List class

Represents a list on a SharePoint Web site.

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client.Phone (in Microsoft.SharePoint.Client.Phone.dll)  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

public class List : SecurableObject

The BrowserFileHandling, DataSource, EffectiveBasePermissions, HasUniqueRoleAssignments, IsAttachmentLibrary, OnQuickLaunch, SchemaXml, ValidationFormula and ValidationMessage properties are not included in the default scalar property set for this type. TheDocument library templates sample app for SharePoint shows how to use this object.

This code example creates a new discussion board list on the current site.

using System;
using Microsoft.SharePoint.Client;

namespace Microsoft.SDK.SharePointFoundation.Samples
    class ListExample
        static void Main()
            string siteUrl = "http://MyServer/sites/MySiteCollection";

            ClientContext clientContext = new ClientContext(siteUrl);
            Web site = clientContext.Web;
            ListCreationInformation newListInfo = new ListCreationInformation();
            newListInfo.Title = "New Discussion Board";
            newListInfo.TemplateType = (int)ListTemplateType.DiscussionBoard;
            List newList = site.Lists.Add(newListInfo);


            Console.WriteLine("Added Discussion Board: " + newList.Title);


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft