Complex.Zero 필드

정의

0과 같은 실수와 0과 같은 허수를 포함하는 새 Complex 인스턴스를 반환합니다.

public: static initonly System::Numerics::Complex Zero;
public static readonly System.Numerics.Complex Zero;
 staticval mutable Zero : System.Numerics.Complex
Public Shared ReadOnly Zero As Complex 

필드 값

예제

다음 예제에서는 사용 하 여 값을 인스턴스화 ComplexZero 속성입니다. 그런 다음, 실제 부분이 0이고 가상 부분이 0인 생성자를 호출 Complex 하여 인스턴스화되는 다른 값과 이 값을 비교합니다. 예제의 출력에서 보여 주듯이 두 값은 같습니다.

using System;
using System.Numerics;

public class Example
{
   public static void Main()
   {
      Complex value = Complex.Zero;
      Console.WriteLine(value.ToString());

      // Instantiate a complex number with real part 0 and imaginary part 1.
      Complex value1 = new Complex(0, 0);
      Console.WriteLine(value.Equals(value1));
   }
}
// The example displays the following output:
//       (0, 0)
//       True
Imports System.Numerics

Module Example
   Public Sub Main()
      Dim value As Complex = Complex.Zero
      Console.WriteLine(value.ToString())
      
      ' Instantiate a complex number with real part 1 and imaginary part 0.
      Dim value1 As New Complex(0, 0)
      Console.WriteLine(value.Equals(value1))
   End Sub
End Module
' The example displays the following output:
'       (0, 0)
'       True

설명

속성은 Zero 값을 0과 비교 Complex 하는 데 가장 자주 사용됩니다.

적용 대상

추가 정보