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);
}