'Usage
Parameters
- left
- The operand that appears to the left of the '+' sign.
- right
- The operand that appears to the right of the '+' sign.
Return Value
A TdNumber containing the sum of the two operands.
'Usage
Exception | Description |
---|---|
System.OverflowException | The result is not in the range (between TdNumber.MinValue and TdNumber.MaxValue) of a TdNumber, or the exponent is less than -130. |
If one of the parameter is TdNumber.Null, the result will be TdNumber.Null
.
// 1 + (-1e-38) = 9.9999999999999999999999999999999999999e-1 TdNumber left01 = new TdNumber(1, 0, 0, 0, 0, 0); // left01 = 1 TdNumber right01 = new TdNumber(unchecked((Int32)0xFFFFFFFF), unchecked((Int32)0xFFFFFFFF), unchecked((Int32)0xFFFFFFFF), unchecked((Int32)0xFFFFFFFF), unchecked((Int32)0xFFFFFFFF, -38); // right01 = -0.00000000000000000000000000000000000001 TdNumber result01 = left01 + right01; Console.WriteLine("{0} + {1} = {2}", left01, right01, result01); // 3.4538475968734 + (-0.4538475968734) = 3 TdNumber left02 = TdNumber.Parse("3.4538475968734"); TdNumber right02 = TdNumber.Parse("-0.4538475968734"); TdNumber result02 = left02 + right02; Console.WriteLine("{0} + {1} = {2}", left02, right02, result02);
Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2