SPField.Delete method
SharePoint 2013
Deletes the field.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
[ClientCallableExceptionConstraintAttribute(FixedId = "3", ErrorType = typeof(InvalidOperationException), Condition = "The field cannot be deleted because it does not allow deletion.")] [ClientCallableMethodAttribute(Name = "DeleteObject", RemoveThisObjectFromParentCollection = true)] public void Delete()
| Exception | Condition |
|---|---|
| ArgumentException | The field cannot be found. |
| InvalidOperationException | The field cannot be deleted. |
| SPException | The field collection containing this field is read-only. |
This method calls the Delete(String) method to delete the field.