RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TReader.ReadString Method

Reads a tagged string value written by WriteString from the reader object's stream and returns its contents.

Pascal
function ReadString: string;
C++
__fastcall AnsiString ReadString();

ReadString is a helper method used by other reader methods to read a string at the current reader Position. ReadString first checks the value type (TValueType) by calling the ReadValue method. If the item is a vaString or a vaLString type ReadString calls Read and returns the string. Otherwise it raises an EReadError exception.

Warning: Always use ReadString for reading component strings to streams.
 

EReadError 

Position 

Read 

ReadValue 

TValueType

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