IsDocSet function is inefficient

Developer
Feb 19, 2013 at 9:26 PM
The code in this project is inefficient in checking if the content type is a document set. To check content type inheritance, simply check the using the content type ID

Below is an example using C#:

public static bool IsDocumentSet(SPContentTypeId currentID)
    {
        SPContentTypeId docsetContentTypeID = new SPContentTypeId("0x0120D520");
        return currentID.IsChildOf(docsetContentTypeID);
    }
Coordinator
Jun 12, 2013 at 1:01 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.