System.IniFiles.TMemIniFile.DeleteKey

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DeleteKey(const Section, Ident: String); override;

C++

virtual void __fastcall DeleteKey(const System::UnicodeString Section, const System::UnicodeString Ident);

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.IniFiles.pas
System.IniFiles.hpp
System.IniFiles TMemIniFile

Description

Deletes a specified entry from the .ini file.

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.

See Also