Equals Method

Matrix.Equals Method

 

Determines whether the two specified Matrix structures have the same values.

Namespace:   System.Windows.Media
Assembly:  WindowsBase (in WindowsBase.dll)

NameDescription
System_CAPS_pubmethodEquals(Matrix)

Determines whether the specified Matrix structure is identical to this instance.

System_CAPS_pubmethodSystem_CAPS_staticEquals(Matrix, Matrix)

Determines whether the two specified Matrix structures are identical.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified Object is a Matrix structure that is identical to this Matrix. (Overrides ValueType.Equals(Object).)

System_CAPS_noteNote

A Matrix stores its values as doubles. Because the value of a Double can lose precision when arithmetic operations are performed on it, a comparison between two Double structures that are logically equal might fail.

The following example shows how to check two Matrix structures for equality.

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);

}
Return to top
Show:
© 2016 Microsoft