Home  |  Delphi .net Home  |  System.Char  |  ToString Method
  
ToString  
Method  
Converts the current Char value to a string
Char Structure
System NameSpace
CF1.  Function ToString : String;
CF2.  Function ToString ( UnicodeChar : Char ) : String; Static;
CF3.  Function ToString ( FormatProvider : IFormatProvider ) : String;
CF : Methods with this mark are Compact Framework Compatible
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
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 
 
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.
   A
   Z
 
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Contact the author