C# Complex Implicit(Double to Complex)

Description

Complex Implicit(Double to Complex) Defines an implicit conversion of a double-precision floating-point number to a complex number.

Syntax

Complex.Implicit(Double to Complex) has the following syntax.


public static implicit operator Complex (
  double value
)

Parameters

Complex.Implicit(Double to Complex) has the following parameters.

  • value - The value to convert to a complex number.

Returns

Complex.Implicit(Double to Complex) method returns An object that contains the value of the value parameter as its real part and zero as its imaginary part.

Example


/*from   w  w w.  j a  va 2s .  c om*/
using System;
using System.Numerics;

public class Example
{
   public static void Main()
   {
        double doubleValue = 1.032e-16;
        System.Numerics.Complex c1 = doubleValue;
        Console.WriteLine(c1);

   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex