Home  |  Delphi .net Home  |  System.Char  |  Equals Method
  
Equals  
Method  
Determines if the current Char equals another
Char Structure
System NameSpace
CF1.  Function Equals ( Target : Object ) : Boolean;
CF : Methods with this mark are Compact Framework Compatible
Description
Returns true if the current Char value matches the Target Char value. Otherwise false.
Notes
If the Target object is null then false is returned.

In .Net, the primitive Char type is mapped to the System.Char structure. Applications written in .Net that use these System.Char features will not compile in earlier Delphi releases.
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
  valueA, valueB : Char;

begin
  valueA := 'A';
  valueB := 'Z';

  Console.WriteLine('valueA  : ' + valueA);
  Console.WriteLine('valueB  : ' + valueB);

  if valueA.Equals(TObject(valueB))
  then Console.WriteLine('valueA  = valueB')
  else Console.WriteLine('valueA <> valueB');

  if valueA.Equals(TObject(valueA))
  then Console.WriteLine('valueA  = valueA')
  else Console.WriteLine('valueA <> valueA');

  Console.ReadLine;
end.
   valueA  : A
   valueB  : B
   valueA <> valueB
   valueA  = valueA
 
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Contact the author