Share via


SPListCollection.Add method (String, String, SPListTemplate, SPDocTemplate)

Creates a document library with the specified title, description, list template object, and document template object.

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

Syntax

'Declaration
Public Overridable Function Add ( _
    title As String, _
    description As String, _
    template As SPListTemplate, _
    documentTemplate As SPDocTemplate _
) As Guid
'Usage
Dim instance As SPListCollection
Dim title As String
Dim description As String
Dim template As SPListTemplate
Dim documentTemplate As SPDocTemplate
Dim returnValue As Guid

returnValue = instance.Add(title, description, _
    template, documentTemplate)
public virtual Guid Add(
    string title,
    string description,
    SPListTemplate template,
    SPDocTemplate documentTemplate
)

Parameters

  • description
    Type: System.String

    A string that contains the description.

Return value

Type: System.Guid
A GUID that identifies the new list.

See also

Reference

SPListCollection class

SPListCollection members

Add overload

Microsoft.SharePoint namespace