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