Description |
The ToString method concerts the current Char value, or the specified UnicodeChar into a string representation.
The FormatProvider parameter determines the parsing rules and is beyond the scope of this article.
|
| Notes | ToString without parameters is a method inherited from the base System.Object (TObject) class. It provides a ready method for classes to convert their content into a string format.
Static methods are not methods of an object - they are simply class functions or procedures available at any time.
|
|
Microsoft MSDN Links |
System
System.Char
|
|
|
A simple example |
program Project1;
{$APPTYPE CONSOLE}
var
myChar : Char;
begin
myChar := 'A';
// Using the object ToString method
Console.WriteLine(myChar.ToString);
// Using the static ToString method
Console.WriteLine(System.Char.ToString('Z'));
Console.ReadLine;
end.
| Show full unit code | A
Z
|
|
|
|