Partilhar via


SPList.IsContentTypeAllowed Method (SPContentType)

Verifies that the list supports the specified content type.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Function IsContentTypeAllowed ( _
    ct As SPContentType _
) As Boolean
'Usage
Dim instance As SPList
Dim ct As SPContentType
Dim returnValue As Boolean

returnValue = instance.IsContentTypeAllowed(ct)
public bool IsContentTypeAllowed(
    SPContentType ct
)

Parameters

Return Value

Type: System.Boolean
true if the list supports the content type; otherwise, false.

Exceptions

Exception Condition
ArgumentNullException

ct is null .

See Also

Reference

SPList Class

SPList Members

IsContentTypeAllowed Overload

Microsoft.SharePoint Namespace