# Point.EqualsPoint.EqualsPoint.EqualsPoint.Equals Method

## 重载

 Equals(Object) Equals(Object) Equals(Object) Equals(Object) 确定指定的 Object 是否是 Point 以及它是否包含与此 Point 相同的坐标。Determines whether the specified Object is a Point and whether it contains the same coordinates as this Point. Equals(Point) Equals(Point) Equals(Point) Equals(Point) 比较两个 Point 结构是否相等。Compares two Point structures for equality. Equals(Point, Point) Equals(Point, Point) Equals(Point, Point) Equals(Point, Point) 比较两个 Point 结构是否相等。Compares two Point structures for equality.

## Equals(Object)Equals(Object)Equals(Object)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 Object Object Object

### 示例

``````private Boolean nonStaticEqualsExample()
{

Point point1 = new Point(10, 5);
Point point2 = new Point(15, 40);

// Check if the two points are equal using the non-static Equals method.
// areEqual is false
Boolean areEqual = point1.Equals(point2);

return areEqual;

}
``````

### 注解

Point使用Double值描述坐标。Point coordinates are described using Double values. 由于在上运算时Double , 的值可能会丢失精度, 因此, 逻辑Point上相等的两个值之间的比较可能会失败。Because the value of a Double can lose precision when operated upon, a comparison between two Point values that are logically equal might fail.

## Equals(Point)Equals(Point)Equals(Point)Equals(Point)

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

#### 参数

value
Point Point Point Point

### 注解

Point坐标使用Double值表示。Point coordinates are expressed using Double values. 由于在上运算时Double , 的值可能会丢失精度, 因此, 逻辑Point上相等的两个值之间的比较可能会失败。Because the value of a Double can lose precision when operated on, a comparison between two Point values that are logically equal might fail.

## Equals(Point, Point)Equals(Point, Point)Equals(Point, Point)Equals(Point, Point)

``````public:
static bool Equals(System::Windows::Point point1, System::Windows::Point point2);``````
``public static bool Equals (System.Windows.Point point1, System.Windows.Point point2);``
``static member Equals : System.Windows.Point * System.Windows.Point -> bool``
``Public Shared Function Equals (point1 As Point, point2 As Point) As Boolean``

#### 参数

point1
Point Point Point Point

point2
Point Point Point Point

### 示例

``````private Boolean staticEqualsExample()
{

Point point1 = new Point(10, 5);
Point point2 = new Point(15, 40);

// Check if the two points are equal using the static Equals method.
// areEqual is false
Boolean areEqual = Point.Equals(point1, point2);

return areEqual;

}
``````