SPSiteCollection.Delete method (String)

Deletes the specified SPSite object from the collection.

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

Syntax

'Declaration
Public Sub Delete ( _
    strSiteUrl As String _
)
'Usage
Dim instance As SPSiteCollection
Dim strSiteUrl As String

instance.Delete(strSiteUrl)
public void Delete(
    string strSiteUrl
)

Parameters

  • strSiteUrl
    Type: System.String

    A string that contains the URL of the site.

Remarks

If the virtual server can contain multiple sites, strSiteUrl cannot be empty; if the server cannot contain multiple sites, it must be "" or "/"

See also

Reference

SPSiteCollection class

SPSiteCollection members

Delete overload

Microsoft.SharePoint.Administration namespace