Does anyone know of a fast way to tell through code if a ContentType is one that's a pre-installed one?

Conversely, I want to know if a given ContentType was provisioned by a custom feature / generated by the user through the WebUI.

Sure, there are short ContentTypeIds (like 0x0102) and long ones (0x0100<flattened guid>), but is there any other way?

I'm asking for any version, 2007 or 2010.

link|improve this question

1  
I think this question dublicates sharepoint.stackexchange.com/questions/11090/… – gandjustas Apr 14 '11 at 15:26
feedback

2 Answers

up vote 2 down vote accepted

http://www.pvle.be/2011/01/is-a-given-field-one-of-sharepoints-built-in-field/

link|improve this answer
That uses SPBuiltInFieldId, but there is a similar concept for built in ContentTypeIds, details here: msdn.microsoft.com/en-us/library/…. Cheers! – James Love Apr 14 '11 at 15:56
feedback

Try this:

SPContentType ct;
//set your content type
bool builtIn = SPBuiltInContentTypeId.Contains(ct.Id);
link|improve this answer
Yup, pretty much inferred from the link posted by @gandjustas, but that's the approach I'll try. – James Love Apr 14 '11 at 17:41
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.