using (SPWeb newWeb = web.Site.OpenWeb(web.ID)) { cT = newWeb.ContentTypes[cT.Id]; SPField myField = cT.Fields[field.Title]; cT.FieldLinks[myField.Id].Hidden = true; cT.Update(true); newWeb.Update(); }
using (SPWeb newWeb = web.Site.OpenWeb(web.ID)) { cT = newWeb.ContentTypes[cT.Id]; SPField myField = cT.Fields[field.Title]; cT.FieldLinks[myField.Id].Hidden = true; cT.Update(true); newWeb.Update(); }