Complex.One Field


Returns a new Complex instance with a real number equal to one and an imaginary number equal to zero.

Namespace:   System.Numerics
Assembly:  System.Numerics (in System.Numerics.dll)

public static readonly Complex One

Field Value

Type: System.Numerics.Complex

The following example instantiates a Complex value by using the One property. It then compares this value to another value that is instantiated by calling the Complex constructor with a real part equal to one and an imaginary part equal to zero. As the output from the example shows, the two values are equal.

using System;
using System.Numerics;

public class Example
   public static void Main()
      Complex value = Complex.One;

      // Instantiate a complex number with real part 1 and imaginary part 0.
      Complex value1 = new Complex(1, 0);
// The example displays the following output:
//       (1, 0)
//       True

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Available since 4.0
Windows Phone
Available since 8.1
Return to top