// Returns a KeyValue in a certain section public string GetKeyValue(string sSection, string sKey) { IniSection s = GetSection(sSection); if (s != null) { IniSection.IniKey k = s.GetAddKey(sKey); if (k != null) { return(k.Value); } } return(string.Empty); }
// Renames an existing key returns true on success, false if the key didn't exist or there was another section with the same sNewKey public bool RenameKey(string sSection, string sKey, string sNewKey) { // Note string trims are done in lower calls. IniSection s = GetSection(sSection); if (s != null) { IniSection.IniKey k = s.GetAddKey(sKey); if (k != null) { return(k.SetName(sNewKey)); } } return(false); }