共用方式為


SPSiteCollection.Delete Method (String)

Deletes the specified SPSite object from the collection.

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

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