SPWeb.Recycle method

Sends the website to the recycle bin.

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

public void Recycle()

ExceptionCondition
SPException

The website is a root web.

NotSupportedException

The website cannot be restored.

The website can be restored or permanently deleted from the recycle bin.

Show: