Hi,
You have tried to order the content type list for a list and you are not able to do it. You always receive an error when UniqueContentTypeOrder is set. Take a look at the following steps in order to resolve the issue.
SPFolder folder = list.RootFolder; IList<SPContentType> contentTypeCollection = new List<SPContentType>(); contentTypeCollection = folder.ContentTypeOrder; contentTypeCollection.RemoveAt(0); folder.UniqueContentTypeOrder = contentTypeCollection; folder.Update();
in the code above the rootfolder for the list is updated with a new content type collection without the first item. This will update fine the list. the differences:
Bye!