Initializes a new instance of the Complex structure using the specified real and imaginary values.
using System;
using System.Numerics;
public class Example
{
public static void Main()
{
Complex complex1 = new Complex(1.3, 1.7);
Complex complex2 = new Complex(8.7, 5.9);
Console.WriteLine("{0} + {1} = {2}", complex1, complex2,
complex1 + complex2);
Console.WriteLine("{0} - {1} = {2}", complex1, complex2,
complex1 - complex2);
Console.WriteLine("{0} * {1} = {2}", complex1, complex2,
complex1 * complex2);
Console.WriteLine("{0} / {1} = {2}", complex1, complex2,
complex1 / complex2);
}
}
Related examples in the same category