Vector3D.Equals Method (Object)

Determines whether the specified object is a Vector3D structure and whether the X, Y, and Z properties of the specified Object are equal to the X, Y, and Z properties of this Vector3D structure.

Namespace:  System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public override bool Equals(
	Object o
)

Parameters

o
Type: System.Object

The object to compare.

Return Value

Type: System.Boolean
true if o is a Vector3D structure and is identical with this Vector3D structure; false otherwise.

If o is not a Vector3D structure, this method returns false.

Vector3D values are described using Double values. Because the value of a Double can lose precision when operated upon, a comparison between two Vector3D values that are logically equal might fail.

The following example shows how to check if an Object and a Vector3D structure are equal.

// Compares an Object and a Vector3D for equality using the non-static Equals method.

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

areEqual = vector1.Equals(vector2);
// areEqual is False	

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft