Table of contents
TOC
Collapse the table of content
Expand the table of content

FieldAndContentTypeExtensions.AddContentTypeToList Method

SharePoint Dev Documents|Last Updated: 5/20/2017
|
1 Contributor

Add content type to list

Namespace:Microsoft.SharePoint.Client
Assembly: OfficeDevPnP.Core.dll

Syntax

public static bool AddContentTypeToList(this List list, ContentType contentType, Boolean defaultContent = False)

Parameters

list

  Type: Microsoft.SharePoint.Client.List
  List to add content type to

contentType

  Type: Microsoft.SharePoint.Client.ContentType
  Content type to add to the list

(optional) defaultContent

  Type: System.Boolean
  If set true, content type is updated to be default content type for the list

Return Value

Type: bool

See also

© 2018 Microsoft