# Matrix.Equals 方法

## 多載

 Equals(Object) 判斷所指定 Object 的 Matrix 結構是否與這個 Matrix 相同。Determines whether the specified Object is a Matrix structure that is identical to this Matrix. Equals(Matrix) 判斷指定的 Matrix 結構是否與這個執行個體相同。Determines whether the specified Matrix structure is identical to this instance. Equals(Matrix, Matrix) 判斷兩個指定的 Matrix 結構是否相同。Determines whether the two specified Matrix structures are identical.

## 範例

``````private void equalityExample()
{

Matrix matrix1 = new Matrix(5, 10, 15, 20, 25, 30);
Matrix matrix2 = new Matrix(5, 10, 15, 20, 25, 30);

Boolean result;

// result is true.
result = (matrix1 == matrix2);

// result is false.
result = (matrix1 != matrix2);
}
``````

## Equals(Object)

``````public:
override bool Equals(System::Object ^ o);``````
``public override bool Equals (object o);``
``override this.Equals : obj -> bool``
``Public Overrides Function Equals (o As Object) As Boolean``

o
Object

Boolean

### 範例

``````private void equalityExample()
{

Matrix matrix1 = new Matrix(5, 10, 15, 20, 25, 30);
Matrix matrix2 = new Matrix(5, 10, 15, 20, 25, 30);

Boolean result;

// result is true.
result = (matrix1 == matrix2);

// result is false.
result = (matrix1 != matrix2);
}
``````

## Equals(Matrix)

``````public:
bool Equals(System::Windows::Media::Matrix value);``````
``public bool Equals (System.Windows.Media.Matrix value);``
``override this.Equals : System.Windows.Media.Matrix -> bool``
``Public Function Equals (value As Matrix) As Boolean``

value
Matrix

Boolean

### 範例

``````private void equalityExample()
{

Matrix matrix1 = new Matrix(5, 10, 15, 20, 25, 30);
Matrix matrix2 = new Matrix(5, 10, 15, 20, 25, 30);

Boolean result;

// result is true.
result = (matrix1 == matrix2);

// result is false.
result = (matrix1 != matrix2);
}
``````

## Equals(Matrix, Matrix)

``````public:
static bool Equals(System::Windows::Media::Matrix matrix1, System::Windows::Media::Matrix matrix2);``````
``public static bool Equals (System.Windows.Media.Matrix matrix1, System.Windows.Media.Matrix matrix2);``
``static member Equals : System.Windows.Media.Matrix * System.Windows.Media.Matrix -> bool``
``Public Shared Function Equals (matrix1 As Matrix, matrix2 As Matrix) As Boolean``

matrix1
Matrix

matrix2
Matrix

Boolean