ContentTypeCollection.AddExistingContentType 方法

释放上下文。

命名空间:  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
要添加到集合ContentType对象。

异常

异常 条件
[ServerException]

集合是只读的。

[SPException]

集合中存在具有相同名称的给定的内容类型的内容类型。

备注

给定的内容类型的名称不能与任何集合中的内容类型相同。

另请参阅

引用

ContentTypeCollection 类

ContentTypeCollection 成员

Microsoft.SharePoint.Client 命名空间