private void WriteCarListUserINI() { //copy back to Cars foreach (Car d in DesiredCarList) { int i = AllCars.FindIndex(x => x.nr == d.nr); if (i == -1) { continue; } AllCars[i] = d; } //write carListUser.ini for all cars in carList.ini INIFile carListUserINI = new INIFile(); foreach (Car c in AllCars) { carListUserINI.SetParameter("engineSound", c.userSettings.engineSound, "Car_" + c.nr); carListUserINI.SetParameter("FMODSoundBank", c.userSettings.FMODSoundBank, "Car_" + c.nr); carListUserINI.SetParameter("hideSteeringWheel", c.userSettings.hideSteeringWheel.ToString(), "Car_" + c.nr); carListUserINI.SetParameter("hideWipers", c.userSettings.hideWipers.ToString(), "Car_" + c.nr); carListUserINI.SetParameter("hideWindShield", c.userSettings.hideWindShield.ToString(), "Car_" + c.nr); } carListUserINI.SaveAs("RBRCIT\\carListUser.ini"); }