I've created few ContentTypes and deployed them using Features. I can associate them to any document libraries by going to Advanced Settings page and selecting Yes to Allow manage content types.
I want to automate allowing magaging content types option by writing C# code using SharePoint object model.
Can anyone provide me good option. I use following line of code to associate my content type to document libraries:
SPContentType content = rootWeb.ContentTypes[MyCustomContentType];