RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TIniFile.DeleteKey Method

Removes an INI file entry for a specified key value.

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

Call DeleteKey to erase an INI file entry. Section is string containing the name of an INI file section, and Ident is a string containing the name of the key from for which to set a nil (Delphi) or NULL (C++) value. 

This version of DeleteKey is only available if the application is compiled for Windows. On Linux, DeleteKey is inherited from TMemIniFile.

Note: Attempting to delete a key in a nonexistent section or attempting to delete a nonexistent key are not errors. In these cases, DeleteKey does nothing.
 

 

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