RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMemIniFile.WriteString Method

Writes a string value to an INI file.

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

Call WriteString to write a string value to an INI file. Section identifies the section in the file that contain the key to which to write. Ident is the name of the key for which to set a value. Value is the string value to write. 

The WriteString method inherited from TCustomIniFile is modified to operate on the in-memory copy of the INI file data. The write methods for all other data types use WriteString internally after data values are translated from the original data type.

Note: Attempting to write a data value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteString creates the section and key and sets its initial value to Value.
 

 

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