Метод 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
)
Параметры
contentType
Тип: Microsoft.SharePoint.Client.ContentTypeA ContentType object that represents the content type to add to the collection. It must not be пустая ссылка (Nothing в Visual Basic).
Возвращаемое значение
Тип: 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.