Compartir a través de


ContentType.DeleteObject Method

Deletes the content type.

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
<RemoteAttribute> _
Public Sub DeleteObject
'Usage
Dim instance As ContentType

instance.DeleteObject()
[RemoteAttribute]
public void DeleteObject()

Exceptions

Exception Condition
[Microsoft.SharePoint.SPContentTypeReadOnlyException]

The content type is read only. Error code: -2146232832.

[Microsoft.SharePoint.SPContentTypeSealedException]

The content type is a sealed content type and there is no list associated with it. Error code: -2146232832.

[Microsoft.SharePoint.SPException]

The content type is the last in the content type collection or failed to remove item from the site. Error code: -2146232832.

See Also

Reference

ContentType Class

ContentType Members

Microsoft.SharePoint.Client Namespace