RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMemIniFile.EraseSection Method

Erases an entire section of the INI file.

Pascal
procedure EraseSection(const Section: string); override;
C++
virtual __fastcall EraseSection(const AnsiString Section);

Call EraseSection to remove a section, all its keys, and their data values from an INI file. Section identifies the INI file section to remove. If a section cannot be removed, an exception is raised. 

EraseSection 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) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!