C# Complex Explicit(BigInteger to Complex)

Description

Complex Explicit(BigInteger to Complex) Defines an explicit conversion of a BigInteger value to a complex number.

Syntax

Complex.Explicit(BigInteger to Complex) has the following syntax.


public static explicit operator Complex (
  BigInteger value
)

Parameters

Complex.Explicit(BigInteger to Complex) has the following parameters.

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

Returns

Complex.Explicit(BigInteger to Complex) method returns A complex number that has a real component equal to value and an imaginary component equal to zero.

Example

The following example illustrates the explicit conversion of BigInteger values to Complex values.


using System;/*  w w w  .  ja v  a  2 s.c  o  m*/
using System.Numerics;

public class Example
{
   public static void Main()
   {
        BigInteger[] numbers= {
                         ((BigInteger) Double.MaxValue) * 2, 
                         BigInteger.Parse("123123123123123"), 
                         BigInteger.One }; 
        foreach (BigInteger number in numbers)
        {
          Complex c1 = (Complex) number;
           Console.WriteLine(c1);
        }  
   }
}
      

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex