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

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 
 
An example of the first syntax
program Project1;
{$APPTYPE CONSOLE}

var
  valueA, valueB : Double;

begin
  valueA := 23;
  valueB := 24;

  Console.WriteLine('valueA  : {0}', valueA.ToString);
  Console.WriteLine('valueB  : {0}', valueB.ToString);

  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  : 23
   valueB  : 24
   valueA <> valueB
   valueA  = valueA
 
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Contact the author