# Complex.Inequality(Complex, Complex) 演算子

## 定義

2 つの複素数が等しくないかどうかを示す値を返します。Returns a value that indicates whether two complex numbers are not 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 op_Inequality : System.Numerics.Complex * System.Numerics.Complex -> bool``
``Public Shared Operator != (left As Complex, right As Complex) As Boolean``

left
Complex

right
Complex

#### 戻り値

Boolean

`left``right` が等しくない場合は `true`。それ以外の場合は `false``true` if `left` and `right` are not equal; otherwise, `false`.

## 注釈

Equality メソッドは、複素数の非等値演算子の演算を定義します。The Equality method defines the operation of the inequality operator for complex numbers. 次のようなコードが有効になります。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 test for inequality by calling the Equals(Complex) method and reversing its value.