Label.DeleteObject method
Deletes the current Label object.
Namespace: Microsoft.SharePoint.Client.Taxonomy
Assembly: Microsoft.SharePoint.Client.Taxonomy (in Microsoft.SharePoint.Client.Taxonomy.dll)
Syntax
'Declaration
Public Sub DeleteObject
'Usage
Dim instance As Label
instance.DeleteObject()
public void DeleteObject()
Exceptions
Exception | Condition |
---|---|
UnauthorizedAccessException | The current user has insufficient permissions to perform this operation. |
TermStoreOperationException | The default label for a Term object in the default language cannot be deleted. Deleting the last Label of a Term is disallowed. Please delete the Term instead. |
Remarks
The current user must have TaxonomyRights.EditTerm permission to use the method. Call the CommitAll() method to save this change to the database.