RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMemIniFile.ReadString Method

Retrieves a string value from the INI file.

Pascal
function ReadString(const Section: string; const Ident: string; const Default: string): string; override;
C++
virtual __fastcall AnsiString ReadString(const AnsiString Section, const AnsiString Ident, const AnsiString Default);

Call ReadString to read a string value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the value. Default is the string value to return if the: 

Section does not exist. 

Key does not exist. 

Data value for the key is not assigned. 

The ReadString method inherited from TCustomIniFile is modified to operate on the in-memory copy of the INI file data. The read methods for all other data types use ReadString internally and then translate to the appropriate data type. 

 

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