Double.Equals Method (Double)
Assembly: mscorlib (in mscorlib.dll)
Depending on your programming language, it might be possible to code a Equals method where the parameter type has fewer bits (is narrower) than the instance type. This is possible because some programming languages perform an implicit widening conversion that represents the parameter as a type with as many bits as the instance.
For example, suppose the instance type is Double and the parameter type is Int32. The Microsoft C# compiler generates instructions to represent the value of the parameter as a Double object, then generates a Double.Equals(Double) method that compares the values of the instance and the widened representation of the parameter.
Consult your programming language's documentation to determine if its compiler performs implicit widening conversions of numeric types. For more information, see the Type Conversion Tables topic.
Precision in Comparisons
The precision of floating-point numbers beyond the documented precision is specific to the implementation and version of the .NET Framework. Consequently, a comparison of two particular numbers might change between versions of the .NET Framework because the precision of the numbers' internal representation might change.
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.