SPList list = web.Lists[<List Name>];
IList<SPContentType> ctoFolder = list.RootFolder.UniqueContentTypeOrder;
for (int i = ctoFolder.Count -1; i >= 0; i--)
{
if (ctoFolder[i].Name == <Content Type Name>)
{
ctoFolder.Remove(ctoFolder[i]);
}
}
list.RootFolder.UniqueContentTypeOrder = ctoFolder;
list.RootFolder.Update();
IList<SPContentType> ctoFolder = list.RootFolder.UniqueContentTypeOrder;
for (int i = ctoFolder.Count -1; i >= 0; i--)
{
if (ctoFolder[i].Name == <Content Type Name>)
{
ctoFolder.Remove(ctoFolder[i]);
}
}
list.RootFolder.UniqueContentTypeOrder = ctoFolder;
list.RootFolder.Update();