public void Cleanup() { if (Bedrolls != null) { Bedrolls.ForEach(f => f.Delete()); Bedrolls.Clear(); } if (MysteriousTunnels != null) { MysteriousTunnels.ForEach(f => f.Delete()); MysteriousTunnels.Clear(); } }
public void Cleanup() { if (Bedrolls != null) { for (var index = 0; index < Bedrolls.Count; index++) { var f = Bedrolls[index]; f.Delete(); } Bedrolls.Clear(); } if (MysteriousTunnels != null) { for (var index = 0; index < MysteriousTunnels.Count; index++) { var f = MysteriousTunnels[index]; f.Delete(); } MysteriousTunnels.Clear(); } }