/// <summary>
        /// Deletes a key from the INI file
        /// </summary>
        /// <param name="Section">Section the key is under</param>
        /// <param name="Key">Key to remove</param>
        /// <returns>True if it is removed, false otherwise</returns>
        public virtual bool DeleteFromINI(string Section, string Key)
        {
            bool ReturnValue = false;

            if (FileContents.ContainsKey(Section) && FileContents[Section].ContainsKey(Key))
            {
                ReturnValue = FileContents[Section].Remove(Key);
                WriteFile();
            }
            return(ReturnValue);
        }
Beispiel #2
0
        /// <summary>
        /// Deletes a section from the INI file
        /// </summary>
        /// <param name="Section">Section to remove</param>
        /// <returns>True if it is removed, false otherwise</returns>
        public virtual bool DeleteFromINI(string Section)
        {
            bool ReturnValue = false;

            if (FileContents.ContainsKey(Section))
            {
                ReturnValue = FileContents.Remove(Section);
                Save(_FileName);
            }
            return(ReturnValue);
        }