How do you set "Allow management of content types?" to "Yes" within a Content Type or List Definition?
This can be done either by setting
EnableContentType=true in the list definition or in the feature activation event we can set the attribute. Please refer the below links. They will definitely help you in solving your problem.
The way I do it is I set the ListCreationInfo and then create the list and enable ContentTypes:
ListCreationInformation creationInfo = new ListCreationInformation();
creationInfo.Title = ListManager.ListTitle;
creationInfo.TemplateType = (int)ListtemplateType.Annoucements;
List list = web.Lists.Add(creationInfo);
list.Description = ListManager.ListDescription;
list.ContentTypesEnabled = true;