SPContentType class

Represents a site or list content type.

System.Object
  Microsoft.SharePoint.SPContentType

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

No code example is currently available or this language may not be supported.

Content types are designed to help users organize their SharePoint content in a more meaningful way. A content type is a reusable collection of settings that you want to apply to a certain category of content. Content types enable you to manage the metadata and behaviors of a document or item type in a centralized, reusable way.

For more information, see Introduction to Content Types.

The following example is a console application that creates a content type and adds it to the site content type collection. Next, the example creates a field (column) and links the field to the new content type. Finally, the example creates a list and adds the new content type to the content type collection that belongs to the list.

Before running the application, you need to add a reference to Microsoft.Sharepoint.dll to your project.

No code example is currently available or this language may not be supported.

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