RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TObject::ToString Method

Returns a string containing the class name.

Pascal
function ToString: string; virtual;
C++
virtual __fastcall string ToString();

By default, the System::TObject::ToString returns a string containing the class name of the instance that is being called.  

 

Calling System::TObject::ToString on a TButton instance returns a string containing "TButton".

Note: System::TObject::ToString is intended to be overridden in user derived classes, in order to provide consumer objects with a string representation.

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