IBinaryReader.ReadString

Syntax

ReadString: String;

Description

The ReadString method reads a character string from a binary file.

Example

Executing this example requires a binary file 1.dat to be present in a root of the disc C.

Sub Main;

Var

File1: IFileInfo;

BinR: IBinaryReader;

s: String;

Begin

File1:=New FileInfo.Attach("c:\1.dat");

If File1.Exists Then

BinR:=File1.OpenBinaryReader;

s:=BinR.ReadString;

End If;

Dispose File1;

End Sub Main;

After executing this example, variable "s" contains a character string read from the binary file 1.dat.

See also:

IBinaryReader