IBinaryWriter.WriteString

Syntax

WriteString(Value: String);

Parameters

Value — character string that must be written.

Description

The WriteString method writes a character string into a binary file.

Example

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

Sub UserProc;
Var
    File1: IFileInfo;
    BinW: IBinaryWriter;
Begin
    File1:=New FileInfo.Attach("c:\1.dat");
    If File1.Exists Then
        BinW:=File1.OpenBinaryWriter(True);
        BinW.WriteString("New Line");
    End If;
    Dispose File1;
End Sub UserProc;

After executing the example the New Line string is written to the 1.dat binary file.

See also:

IBinaryWriter