Home  |  Delphi .net Home  |  System.Boolean  |  ToString Method
ToString  
Method  
Converts the value of this Boolean to its equivalent string representation.
Boolean Structure
System NameSpace
CF1.  Function ToString ( ) : String ;
CF2.  Function ToString ( FormatProvider : IFormatProvider; ) : String;
CF : Methods with this mark are Compact Framework Compatible
Description
Returns the string 'false' or 'true' according to the current Boolean value.
 
The FormatProvider parameter determines the parsing rules and is beyond the scope of this article.
Microsoft MSDN Links
System
System.Boolean
 
 
A simple example
program Project1;
{$APPTYPE CONSOLE}

var
  aTrue, aFalse : Boolean;

begin
  aTrue  := true;
  aFalse := false;

  Console.WriteLine('aTrue  = {0}', aTrue.ToString);
  Console.WriteLine('aFalse = {0}', aFalse.ToString);

  Console.ReadLine;
end.
Show full unit code
  aTrue  = True
  aFalse = False
 
 
Delphi Programming © Neil Moffatt All rights reserved.  |  Contact the author