다음을 통해 공유


SPContentTypeCollection Class

Represents a collection of web or list content types.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPAutoSerializingObject
    Microsoft.SharePoint.SPBaseCollection
      Microsoft.SharePoint.SPContentTypeCollection

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

Syntax

'Declaration
<ClientCallableTypeAttribute(Name := "ContentTypeCollection", ServerTypeId := "{653e9412-6245-4a3f-829b-cfdbf7fd86a5}",  _
    CollectionChildItemType := GetType(SPContentType))> _
<SubsetCallableTypeAttribute> _
Public NotInheritable Class SPContentTypeCollection _
    Inherits SPBaseCollection
'Usage
Dim instance As SPContentTypeCollection
[ClientCallableTypeAttribute(Name = "ContentTypeCollection", ServerTypeId = "{653e9412-6245-4a3f-829b-cfdbf7fd86a5}", 
    CollectionChildItemType = typeof(SPContentType))]
[SubsetCallableTypeAttribute]
public sealed class SPContentTypeCollection : SPBaseCollection

Remarks

When contained in an SPWeb object, the collection represents a collection of web content types; when contained in an SPList object, it represents a collection of list content types.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SPContentTypeCollection Members

Microsoft.SharePoint Namespace

Other Resources

Introduction to Content Types

Site and List Content Types

Base Content Type Hierarchy