Partilhar via


SPList.ContentTypes Property

Gets the content types that are associated with the list.

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

Syntax

'Declaration
<ClientCallableAttribute> _
<ClientCallableConstraintAttribute(Type := ClientCallableConstraintType.NotNull)> _
Public ReadOnly Property ContentTypes As SPContentTypeCollection
    Get
'Usage
Dim instance As SPList
Dim value As SPContentTypeCollection

value = instance.ContentTypes
[ClientCallableAttribute]
[ClientCallableConstraintAttribute(Type = ClientCallableConstraintType.NotNull)]
public SPContentTypeCollection ContentTypes { get; }

Property Value

Type: Microsoft.SharePoint.SPContentTypeCollection
An SPContentTypeCollection collection that contains the content types that are associated with the list.

See Also

Reference

SPList Class

SPList Members

Microsoft.SharePoint Namespace