Share via


ContentType.Update method

Updates the content type definition that is stored in the database and, optionally, updates all content types that inherit from the content type.

Namespace:  Microsoft.SharePoint.Client
Assembly:  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
Public Sub Update ( _
    updateChildren As Boolean _
)
'Usage
Dim instance As ContentType
Dim updateChildren As Boolean

instance.Update(updateChildren)
public void Update(
    bool updateChildren
)

Parameters

  • updateChildren
    Type: System.Boolean

    true to update content types that inherit from the content type; otherwise, false.

Exceptions

Exception Condition
[Microsoft.SharePoint.SPContentTypeReadOnlyException]

The content type is read only or updateChildren is true and one of the child objects of the content type is read only. Error code: -2146232832.

[Microsoft.SharePoint.SPContentTypeSealedException]

updateChildren is true and one of the child objects of the content type is a sealed content type. Error code: -2146232832.

[Microsoft.SharePoint.SPException]

Collection is read only or updateChildren is true and there are no child objects of the content type. Error code: -2146232832.

See also

Reference

ContentType class

ContentType members

Microsoft.SharePoint.Client namespace