Partilhar 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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

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