RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMemIniFile.DeleteKey Method

Deletes a specified entry from the .ini file.

Pascal
procedure DeleteKey(const Section: String; const Ident: String); override;
C++
virtual __fastcall DeleteKey(const AnsiString Section, const AnsiString Ident);

Call DeleteKey to erase .ini file entry. Section is string containing the name of a .ini file section, and Ident is a string containing the name of the key to remove.

Note: Attempting to erase a key in a nonexistent section or attempting to erase a nonexistent key are not errors. In these cases, DeleteKey does nothing.
DeleteKey only affects the in-memory copy of the .ini file, not the copy on disk. The change is not written to disk until you call UpdateFile

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!