Complex.Zero Field


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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

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

Public Shared ReadOnly Zero As Complex

Field Value

Type: System.Numerics.Complex

The Zero property is most frequently used to compare a Complex value to zero.

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

Imports System.Numerics

Module Example
   Public Sub Main()
      Dim value As Complex = Complex.Zero

      ' Instantiate a complex number with real part 1 and imaginary part 0.
      Dim value1 As New Complex(0, 0)
   End Sub
End Module
' The example displays the following output:
'       (0, 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