Поделиться через


Метод ContentTypeCollection.AddExistingContentType

Adds the specified content type to the collection.

Пространство имен:  Microsoft.SharePoint.Client
Сборки:   Microsoft.SharePoint.Client.Silverlight (в Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client.Phone (в Microsoft.SharePoint.Client.Phone.dll)  Microsoft.SharePoint.Client (в 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
)

Параметры

Возвращаемое значение

Тип: Microsoft.SharePoint.Client.ContentType
A ContentType object to add to the collection.

Исключения

Исключение Условие
[ServerException]

The collection is read only.

[SPException]

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.

См. также

Справочные материалы

ContentTypeCollection класс

Элементы ContentTypeCollection

Пространство имен Microsoft.SharePoint.Client