Converts the complex number to a double-precision real number.
- z (Complex)
- The complex number to covert.
The corresponding double-precision real number.
This explicit cast will fail if the complex number has a non-zero imaginary part. If you just want to obtain the real part of a complex number, use the Re property.
| Exception | Condition |
|---|---|
| InvalidCastException | z.Im ≠ 0 |