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
title
Type: System.StringA string that contains the title.
description
Type: System.StringA string that contains the description.
template
Type: Microsoft.SharePoint.SPListTemplateThe list definition or list template.
documentTemplate
Type: Microsoft.SharePoint.SPDocTemplateThe document template.
Return value
Type: System.Guid
A GUID that identifies the new list.