Equals Method (Object)
Collapse the table of content
Expand the table of content

Point4D.Equals Method (Object)


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

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

Public Overrides Function Equals (
	o As Object
) As Boolean


Type: System.Object

The object to compare.

Return Value

Type: System.Boolean

true if instances are equal; otherwise, false.

true if o (the passed Object) is a Point4D structure and is identical with this Point4D structure; false otherwise.

If o (the passed object) is not a Point4D structure, this method returns false.

Because a Double value can lose precision when arithmetic operations are performed on them, a comparison between two Point4D values that are logically equal might fail.

The following example shows how to check whether an Object and a Point4D structure are equal.

' Compares an Object and a Point4D for equality using the non-static Equals method.

Dim point1 As New Point4D(10, 5, 1, 4)
Dim point2 As New Point4D(15, 40, 60, 75)
Dim areEqual As Boolean

areEqual = point1.Equals(point2)
' areEqual is False.  point2 is a Point4D structure, but it is not equal to point1.	

' Displaying Results
syntaxString = "areEqual = point1.Equals(point2)"
resultType = "Boolean"
operationString = "Checking if two 3D points are equal"
ShowResults(areEqual.ToString(), syntaxString, resultType, operationString)

.NET Framework
Available since 3.0
Return to top
© 2016 Microsoft