# Vector3D.Inequality(Vector3D, Vector3D) 運算子

## 定義

``````public:
static bool operator !=(System::Windows::Media::Media3D::Vector3D vector1, System::Windows::Media::Media3D::Vector3D vector2);``````
``public static bool operator != (System.Windows.Media.Media3D.Vector3D vector1, System.Windows.Media.Media3D.Vector3D vector2);``
``static member op_Inequality : System.Windows.Media.Media3D.Vector3D * System.Windows.Media.Media3D.Vector3D -> bool``
``Public Shared Operator != (vector1 As Vector3D, vector2 As Vector3D) As Boolean``

vector1
Vector3D

vector2
Vector3D

## 範例

``````// Checks if two Vector3D structures are not equal using the overloaded inequality operator.

Vector3D vector1 = new Vector3D(20, 30, 40);
Vector3D vector2 = new Vector3D(45, 70, 80);
Boolean areNotEqual;

areNotEqual = (vector1 != vector2);
// areNotEqual is True
``````
``````' Checks if two Vector3D structures are not equal using the overloaded inequality operator.

Dim vector1 As New Vector3D(20, 30, 40)
Dim vector2 As New Vector3D(45, 70, 80)
Dim areNotEqual As Boolean

areNotEqual = (vector1 <> vector2)
' areNotEqual is True
``````

## 備註

Vector3D值會使用Double值來描述。Vector3D values are described using Double values. 當運算時, 的Double值可能會失去有效位數, 因此在邏輯上Vector3D相等的兩個值之間的比較可能會失敗。Because the value of a Double can lose precision when operated upon, a comparison between two Vector3D values that are logically equal might fail.