释放上下文。
命名空间: 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.ContentType表示要添加到集合的内容类型的ContentType对象。它不能空引用(无 在 Visual Basic 中)。
返回值
类型:Microsoft.SharePoint.Client.ContentType
要添加到集合ContentType对象。
异常
| 异常 | 条件 |
|---|---|
| [ServerException] | 集合是只读的。 |
| [SPException] | 集合中存在具有相同名称的给定的内容类型的内容类型。 |
备注
给定的内容类型的名称不能与任何集合中的内容类型相同。