private static void EraseSection(string remove, string exists) { using (IniFile ini = new IniFile(fileName)) { Assert.IsTrue(ini.SectionExists(remove)); ini.EraseSection(remove); Assert.IsFalse(ini.SectionExists(remove)); Assert.IsTrue(ini.SectionExists(exists)); } using (IniFile ini = new IniFile(fileName)) { Assert.IsFalse(ini.SectionExists(remove)); Assert.IsTrue(ini.SectionExists(exists)); } }