ContentTypeCollection.AddExistingContentType method

Adds the specified content type to the collection.

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


Public Function AddExistingContentType ( _
    contentType As ContentType _
) As ContentType
Dim instance As ContentTypeCollection
Dim contentType As ContentType
Dim returnValue As ContentType

returnValue = instance.AddExistingContentType(contentType)
public ContentType AddExistingContentType(
    ContentType contentType


Return value

Type: Microsoft.SharePoint.Client.ContentType
A ContentType object to add to the collection.


Exception Condition

The collection is read only.


A content type with same name as the given content type exists in the collection.


The name of the given content type must not be the same as any of the content types in the collection.

See also


ContentTypeCollection class

ContentTypeCollection members

Microsoft.SharePoint.Client namespace