Create a new Complex number with a real number equal to zero and an imaginary number equal to one in CSharp
Description
The following code shows how to create a new Complex number with a real number equal to zero and an imaginary number equal to one.
Example
using System;/*from w w w . j av a 2 s . c o m*/
using System.Numerics;
public class Example
{
public static void Main()
{
Complex value = Complex.ImaginaryOne;
Console.WriteLine(value.ToString());
Complex value1 = new Complex(0, 1);
Console.WriteLine(value.Equals(value1));
}
}
The code above generates the following result.