Home  |  Delphi .net Home  |  System.Decimal  |  Equals Method

Equals
Method
Determines if the current Decimal equals another
 Decimal Structure System NameSpace
 CF 1 Function Equals ( Target : Object ) : Boolean; CF 2 Function Equals ( ValueA : Decimal; ValueB : Decimal ) : Boolean; Static;
CF : Methods with this mark are Compact Framework Compatible
 Description Returns true if the current Decimal value matches the Target Decimal value. Otherwise false. Or, in syntax 2, ValueA matches ValueB. Notes If the Target object is null then false is returned. Microsoft MSDN Links System System.Decimal 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 : Decimal; 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 An example of the static method program Project1; {\$APPTYPE CONSOLE} var   valueA, valueB : Decimal; begin   valueA := 23;   valueB := 24;   Console.WriteLine('valueA  : {0}', valueA.ToString);   Console.WriteLine('valueB  : {0}', valueB.ToString);   if System.Decimal.Equals(valueA, valueB)   then Console.WriteLine('valueA  = valueB')   else Console.WriteLine('valueA <> valueB');   if System.Decimal.Equals(valueA, 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 All rights reserved.  |  Contact the author