RAD Studio VCL Reference
TWriter.WriteString Method

Writes tagged data to the writer object's stream.

procedure WriteString(const Value: UnicodeString);
__fastcall WriteString(const UnicodeString Value);

WriteString is used internally by the component streaming system to write component properties to a stream. WriteString is otherwise only used by component writers in the DefineProperties and WriteData procedures. 

WriteString writes the string passed in Value to the writer object's stream. WriteString checks to ensure that Value is the correct type before calling Write to write the string and its value type to the stream.

Warning: Always use WriteString for writing component strings to streams. The similarly-named WriteStr method is for internal use by certain components and can corrupt data if not used correctly.


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!