public bool PutFile(MOG_Ini iniFile) { string section, key, value; // Loop through all the sections and keys and add them to our ini for (int x = 0; x < iniFile.CountSections(); x++) { section = iniFile.GetSectionByIndex(x); if (iniFile.CountKeys(section) != 0) { for (int y = 0; y < iniFile.CountKeys(section); y++) { key = iniFile.GetKeyNameByIndex(section, y); value = iniFile.GetKeyByIndex(section, y); PutString(section, key, value); } } else { // Add the section with no keys into our ini PutSectionString(section, ""); } } return(true); }