共用方式為


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
)

參數

  • name
    Type: System.String

    新的內容型別名稱。這個值會設定為Name屬性的值。

Exceptions

Exception Condition
SPException

無法修改contentTypes引數中傳遞的集合。

-或-

找不到父系內容類型。

請參閱

參照

SPContentType class

SPContentType members

SPContentType overload

Microsoft.SharePoint namespace