Go back to index
How to delete scope from site
Following code block explains how to programmatically delete a scope from a site collection.
using System;
using SPTool.Library;
namespace SPTool.Test
{
class Program
{
static void Main(string[] args)
{
SPTSite site = new SPTSite("http://sptool/");
// Delete Scope
SPTReturn returnObj = site.DeleteScope("SPTool Site Scope");
// Check the status of deleting scope
if (returnObj.State == SPTState.Success)
{
// Scope deleted successfully
}
else
{
// Deleting Scope failed
}
}
}
}
Go back to index