void MapStructuresCatego() { var infrastructure = StInfr.GetValues(typeof(StInfr)); var housing = StHous.GetValues(typeof(StHous)); var farming = StFarm.GetValues(typeof(StFarm)); var raw = StRaw.GetValues(typeof(StRaw)); var production = StProd.GetValues(typeof(StProd)); var industry = StInd.GetValues(typeof(StInd)); var trade = StTrade.GetValues(typeof(StTrade)); var govServ = StGov.GetValues(typeof(StGov)); var other = StOther.GetValues(typeof(StOther)); var mil = StMil.GetValues(typeof(StMil)); var structCateg = StCat.GetValues(typeof(StCat)); var dec = StDec.GetValues(typeof(StDec)); MenuGroupsList = UList.ConvertToList(structCateg); List <List <H> > listedArrays = new List <List <H> >(); listedArrays.Add(UList.ConvertToList(infrastructure)); listedArrays.Add(UList.ConvertToList(housing)); listedArrays.Add(UList.ConvertToList(farming)); listedArrays.Add(UList.ConvertToList(raw)); listedArrays.Add(UList.ConvertToList(production)); listedArrays.Add(UList.ConvertToList(industry)); listedArrays.Add(UList.ConvertToList(trade)); listedArrays.Add(UList.ConvertToList(govServ)); listedArrays.Add(UList.ConvertToList(other)); listedArrays.Add(UList.ConvertToList(mil)); listedArrays.Add(UList.ConvertToList(dec)); for (int i = 0; i < MenuGroupsList.Count; i++) { _structuresDict.Add(MenuGroupsList[i], listedArrays[i]); } foreach (KeyValuePair <H, List <H> > entry in StructuresDict) { for (int i = 0; i < entry.Value.Count; i++) { AllStructures.Add(entry.Value[i]); } } }