Complex::Equality Operator
Returns a value that indicates whether two complex numbers are equal.
Assembly: System.Numerics (in System.Numerics.dll)
Parameters
- left
- Type: System.Numerics::Complex
The first complex number to compare.
- right
- Type: System.Numerics::Complex
The second complex number to compare.
Return Value
Type: System::Booleantrue if the left and right parameters have the same value; otherwise, false.
The Equality method defines the operation of the equality operator for Complex values. It enables code such as the following:
Languages that do not support custom operators can call the Equals(Complex) method instead.
Two complex numbers are equal if their real parts are equal and their imaginary parts are equal. The Equality method is equivalent to the following expression:
Note that, because of differences in precision, two complex numbers that are apparently equivalent can be considered unequal. For more information and a possible workaround, see the Equals(Complex) method.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.