Share via


SPWebTemplateCollection class

表示SPWebTemplate物件的集合。

Inheritance hierarchy

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

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

Syntax

'宣告
Public Class SPWebTemplateCollection _
    Inherits SPBaseCollection
'用途
Dim instance As SPWebTemplateCollection
public class SPWebTemplateCollection : SPBaseCollection

備註

使用SPSite類別的GetCustomWebTemplates方法來傳回集合的網站範本在網站集合中,或使用SPSite類別的GetWebTemplates方法在網站集合中傳回的站台定義設定集合。集合的參照之後,可用於索引子,並傳回單一站台定義組態或站台範本。例如,如果集合指派給一個名為myWebTemplates變數,Microsoft Visual C#,或myWebTemplates(index) 在 Microsoft Visual Basic,其中index是標題或索引中的數字的站台定義組態或站台範本集合中使用myWebTemplates[index]。

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.

請參閱

參照

SPWebTemplateCollection members

Microsoft.SharePoint namespace