I have a SharePoint list that gets installed by a feature.
I need to enable content types which I do so in a feature receiver:
SPList list = site.Lists["NameOfList"];
list.ContentTypesEnabled = true;
list.Update();
The problem is that it seems the method:site.Lists["NameOfList"], is really looking at the Title not the ID.
How can I get the list by using the ID and NOT the title which is subject to change because of Localization...
<ListInstance
TemplateType="10051"
Id="ThisISTheIDField" //Want to retrieve list instance based on this field.
Title="$Resources:MyFile,MyResourceName;"
Url="Lists/URLOFList"
OnQuickLaunch="TRUE">
</ListInstance>
Thanks in advance. And 10 years of hail Maries for the MS SharePoint developer who wrote this internal dare I say - c.r.a.p?