Share via


Helper.GetDefaultContentTypeId Method

Retrieves the default content type ID for a list.

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

Syntax

'Declaration
Public Shared Function GetDefaultContentTypeId ( _
    list As SPList _
) As SPContentTypeId
'Usage
Dim list As SPList
Dim returnValue As SPContentTypeId

returnValue = Helper.GetDefaultContentTypeId(list)
public static SPContentTypeId GetDefaultContentTypeId(
    SPList list
)

Parameters

Return Value

Type: Microsoft.SharePoint.SPContentTypeId
Returns a SPContentTypeId object containing the default content type ID.

Remarks

If the list does not allow content types or does not have any non- null content types, the return value will be SPContentTypeID.Empty.

See Also

Reference

Helper Class

Helper Members

Microsoft.SharePoint.WorkflowActions Namespace