C# Complex Implicit(Single to Complex)

Description

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

Syntax

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


public static implicit operator Complex (
  float value
)

Parameters

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

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

Returns

Complex.Implicit(Single 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


/*  w w w .  ja v a2s.  c  o  m*/

using System;
using System.Numerics;

public class Example
{
   public static void Main()
   {
        float singleValue = 1.032e-08f;
        System.Numerics.Complex c1 = singleValue;
        Console.WriteLine(c1);

   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex