# Complex.Equality(Complex, Complex)Complex.Equality(Complex, Complex)Complex.Equality(Complex, Complex)Complex.Equality(Complex, Complex) Operator

## 定義

2 つの複素数が等しいかどうかを示す値を返します。Returns a value that indicates whether two complex numbers are equal.

``````public:
static bool operator ==(System::Numerics::Complex left, System::Numerics::Complex right);``````
``public static bool operator == (System.Numerics.Complex left, System.Numerics.Complex right);``
``static member ( = ) : System.Numerics.Complex * System.Numerics.Complex -> bool``
``Public Shared Operator == (left As Complex, right As Complex) As Boolean``

#### パラメーター

left
Complex Complex Complex Complex

right
Complex Complex Complex Complex

#### 戻り値

`left` パラメーターと `right` パラメーターが同じ値の場合は `true`。それ以外の場合は `false``true` if the `left` and `right` parameters have the same value; otherwise, `false`.

## 注釈

Equalityメソッド定義の等値演算子の操作Complex値。The Equality method defines the operation of the equality operator for Complex values. 次のようなコードが有効にします。It enables code such as the following:

``````Complex c1 = new Complex(12.6, 4.3);
Complex c2 = new Complex(11.1, 8.9);
if (c1 == c2)
``````
``````Dim c1 As New Complex(12.6, 4.3)
Dim c2 As New Complex(11.1, 8.9)
If c1 = c2 Then
``````

カスタム演算子をサポートしない言語を呼び出すことができます、Equals(Complex)メソッド代わりにします。Languages that do not support custom operators can call the Equals(Complex) method instead.

2 つの複素数は、その実数部が等しくないと、その虚数が等しい場合は等しくなります。Two complex numbers are equal if their real parts are equal and their imaginary parts are equal. Equalityメソッドは、次の式と同じです。The Equality method is equivalent to the following expression:

``````return this.Real == value.Real && this.Imaginary == value.Imaginary;
``````
``````Return Me.Real = value.Real AndAlso Me.Imaginary = value.Imaginary
``````

この演算子を同等のメソッドは、します。 Complex.EqualsThe equivalent method for this operator is Complex.Equals