SPContentType constructor (SPContentTypeId, SPContentTypeCollection, String)
初始化使用指定的SPContentTypeId結構的SPContentType類別的新執行個體。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Sub New ( _
contentTypeId As SPContentTypeId, _
contentTypes As SPContentTypeCollection, _
name As String _
)
'用途
Dim contentTypeId As SPContentTypeId
Dim contentTypes As SPContentTypeCollection
Dim name As String
Dim instance As New SPContentType(contentTypeId, _
contentTypes, name)
public SPContentType(
SPContentTypeId contentTypeId,
SPContentTypeCollection contentTypes,
string name
)
參數
contentTypeId
Type: Microsoft.SharePoint.SPContentTypeId新的內容類型的內容類型識別碼。
Parent屬性的值決定藉由檢查傳入此參數的內容型別 ID。
contentTypes
Type: Microsoft.SharePoint.SPContentTypeCollection要加入至新的內容類型的集合。
name
Type: System.String新的內容型別名稱。這個值會設定為Name屬性的值。
Exceptions
Exception | Condition |
---|---|
SPException | 無法修改contentTypes引數中傳遞的集合。 -或- 找不到父系內容類型。 |