共用方式為


SPSiteCollection.Item property (Int32)

取得SPSite物件在集合中的指定索引處。在 C# 中,這個屬性會是SPSiteCollection類別的索引器。

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

Syntax

'宣告
Public ReadOnly Default Property Item ( _
    index As Integer _
) As SPSite
    Get
'用途
Dim instance As SPSiteCollection
Dim index As Integer
Dim value As SPSite

value = instance(index)
public SPSite this[
    int index
] { get; }

參數

  • index
    Type: System.Int32

    32 位元整數,會指定索引。

Property value

Type: Microsoft.SharePoint.SPSite
表示最上層網站的SPSite物件。

請參閱

參照

SPSiteCollection class

SPSiteCollection members

Item overload

Microsoft.SharePoint.Administration namespace