SPContentType constructor (SPContentTypeId, SPContentTypeCollection, String)

Initializes a new instance of the SPContentType class using the specified SPContentTypeId structure.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)


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

    The name for the new content type. This value is set as the value of the Name property.


Exception Condition

The collection passed in the contentTypes argument cannot be modified.


The parent content type cannot be found.

See also


SPContentType class

SPContentType members

SPContentType overload

Microsoft.SharePoint namespace