Export (0) Print
Expand All

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)

'Declaration
Public Shared ReadOnly One As 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.


Imports System.Numerics

Module Example
   Public Sub Demo(ByVal outputBlock As System.Windows.Controls.TextBlock)
      Dim value As Complex = Complex.One
      outputBlock.Text &= value.ToString() & vbCrLf

      ' Instantiate a complex number with real part 1 and imaginary part 0.
      Dim value1 As New Complex(1, 0)
      outputBlock.Text &= value.Equals(value1) & vbCrLf
   End Sub
End Module
' The example displays the following output:
'       (1, 0)
'       True


Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2015 Microsoft