Partager via


Field.DeleteObject - Méthode

Deletes the field from the list, from the site, or from the content types within the list.

Espace de noms :  Microsoft.SharePoint.Client
Assemblys :   Microsoft.SharePoint.Client.Silverlight (dans Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client.Phone (dans Microsoft.SharePoint.Client.Phone.dll)  Microsoft.SharePoint.Client (dans Microsoft.SharePoint.Client.dll)

Syntaxe

'Déclaration
Public Sub DeleteObject
'Utilisation
Dim instance As Field

instance.DeleteObject()
public void DeleteObject()

Exceptions

Exception Condition
[SPException]

Thrown when the field has one or more dependent lookup fields, or the field is a site column used in a list. Error code: -2146232832. Thrown when the field is inherited from the base type of the list and CanBeDeleted is false. Error code: -2130575215.Thrown when the field is hidden. Error code: -2130575214. Thrown when the Sealed property is true and the CanBeDeleted property is false. Error code: -2130575213. Or thrown when the ReadOnlyField property is true. Error code:-2130575212.

SPQueryThrottledException

Thrown when the throttling limit is exceeded by the operation. Error code: -2147024860.

[ArgumentException]

Thrown when the field does not exist. Error code: -2147024809.

[InvalidOperationException]

Thrown when the CanBeDeleted property of the field is false. Error code: -1.

[UnauthorizedAccessException]

Thrown when the current user has insufficient permissions. Error code: -2147024891.

Voir aussi

Référence

Field classe

Field - Membres

Microsoft.SharePoint.Client - Espace de noms