SPListTemplateCollection Class

Represents a collection of SPListTemplate objects.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPAutoSerializingObject
    Microsoft.SharePoint.SPBaseCollection
      Microsoft.SharePoint.SPListTemplateCollection

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
<ClientCallableTypeAttribute(Name := "ListTemplateCollection", ServerTypeId := "23748d10-16a1-4946-a38b-98fdec0e0ec8",  _
    CollectionChildItemType := GetType(SPListTemplate))> _
<SubsetCallableTypeAttribute> _
Public Class SPListTemplateCollection _
    Inherits SPBaseCollection
'Usage
Dim instance As SPListTemplateCollection
[ClientCallableTypeAttribute(Name = "ListTemplateCollection", ServerTypeId = "23748d10-16a1-4946-a38b-98fdec0e0ec8", 
    CollectionChildItemType = typeof(SPListTemplate))]
[SubsetCallableTypeAttribute]
public class SPListTemplateCollection : SPBaseCollection

Remarks

Use the ListTemplates property of the SPWeb class to return an SPListTemplateCollection object that represents the collection of list definitions for a Web site. Use the GetCustomListTemplates method of the SPSite class to return an SPListTemplateCollection object that represents the collection of list templates for a site collection. Use an indexer to return a single list definition or list template from the collection. For example, if the collection is assigned to a variable named myListTemplates, use myListTemplates[index] in Microsoft Visual C#, or myListTemplates(index) in Microsoft Visual Basic, where index is the index number of the definition or template in the collection or the name of the definition or template.

Thread Safety

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

See Also

Reference

SPListTemplateCollection Members

Microsoft.SharePoint Namespace