Share via


SPSiteCollection.Item Property (String)

Gets the SPSite object at the specified server-relative URL in the collection.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public ReadOnly Default Property Item ( _
    strSiteName As String _
) As SPSite
    Get
'Usage
Dim instance As SPSiteCollection
Dim strSiteName As String
Dim value As SPSite

value = instance(strSiteName)
public SPSite this[
    string strSiteName
] { get; }

Parameters

  • strSiteName
    Type: System.String

    A string that contains the server-relative URL of the site object (for example, Site_Name or sites/Site_Name).

Property Value

Type: Microsoft.SharePoint.SPSite
An SPSite object.

See Also

Reference

SPSiteCollection Class

SPSiteCollection Members

Item Overload

Microsoft.SharePoint.Administration Namespace