C# Complex Imaginary
Description
Complex Imaginary
Gets the imaginary component of the
current Complex object.
Syntax
Complex.Imaginary
has the following syntax.
public double Imaginary { get; }
Example
//ww w . j av a2 s .c om
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.