AutoQuery.Systems.Ini.RemoveEntry C# (CSharp) Метод

RemoveEntry() публичный Метод

Removes an entry from a section.
The Profile.Changing event is raised before removing the entry. If its ProfileChangingArgs.Cancel property is set to true, this method returns immediately without removing the entry. After the entry has been removed, the Profile.Changed event is raised.
/// is null or empty or /// is true. /// Either section or entry is null. /// The API failed.
public RemoveEntry ( string section, string entry ) : void
section string /// The name of the section that holds the entry.
entry string /// The name of the entry to remove.
Результат void
            public override void RemoveEntry(string section, string entry)
            {
                // Verify the entry exists
                if (!HasEntry(section, entry))
                    return;

                VerifyNotReadOnly();
                VerifyName();
                VerifyAndAdjustSection(ref section);
                VerifyAndAdjustEntry(ref entry);

                if (!RaiseChangeEvent(true, ProfileChangeType.RemoveEntry, section, entry, null))
                    return;

                if (WritePrivateProfileString(section, entry, 0, Name) == 0)
                    throw new Win32Exception();

                RaiseChangeEvent(false, ProfileChangeType.RemoveEntry, section, entry, null);
            }