C# Complex Real

Description

Complex Real Gets the real component of the current Complex object.

Syntax

Complex.Real has the following syntax.


public double Real { get; }

Example


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

public class Example
{
   public static void Main()
   {
      Complex[] values = { new Complex(1.5, -6.3), 
                           new Complex(-1.8, 1.7), 
                           new Complex(1.4, 8.9) };
      foreach (var value in values)
         Console.WriteLine("{0} + {1}i", value.Real, value.Imaginary);
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Numerics »




BigInteger
Complex