Add(String, String, Microsoft.SharePoint.SPListTemplate) Method

The Add method of the SPListCollection class creates a list with the specified title, description, and list template object.

Parameters

Return Value

The GUID for the new list.

Example

The following code example creates a list in each of the sites of a site collection based on the first template within the collection of custom list templates for one of the sites in the collection.

This example requires using directives (Imports in Visual Basic) for both the Microsoft.SharePoint and Microsoft.SharePoint.WebControls namespaces.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security