C# Complex ToString()

Description

Complex ToString() Converts the value of the current complex number to its equivalent string representation in Cartesian form.

Syntax

Complex.ToString() has the following syntax.


public override string ToString()

Returns

Complex.ToString() method returns The string representation of the current instance in Cartesian form.

Example


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

public class Example
{
   public static void Main()
   {
      Complex[] c = { new Complex(17.3, 14.1), 
                      new Complex(-11.154, -17.002) };
      foreach (Complex c1 in c)
         Console.WriteLine(c1.ToString());
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex