Point.Inequality(Point, Point) 연산자

정의

같지 않음에 대한 두 Point 구조를 비교합니다.

public:
 static bool operator !=(System::Windows::Point point1, System::Windows::Point point2);
public static bool operator !=(System.Windows.Point point1, System.Windows.Point point2);
static member op_Inequality : System.Windows.Point * System.Windows.Point -> bool
Public Shared Operator != (point1 As Point, point2 As Point) As Boolean

매개 변수

point1
Point

비교할 첫 번째 지점입니다.

point2
Point

비교할 두 번째 지점입니다.

반품

true다른 point1 좌표 또는 point2 좌표가 XY 있고 같 falsepoint1point2 좌표가 있는 경우 XY

예제

다음 예제에서는 오버로드된(!=) 연산자를 사용하여 두 Point 구조체가 같지 않은지 확인하는 방법을 보여 줍니다.

private Boolean overloadedInequalityOperatorExample()
{
    Point point1 = new Point(20, 30);
    Point point2 = new Point(45, 70);

    // Check whether the two Points are not equal, using the overloaded 
    // inequality operator.
    // areNotEqual is True.
    Boolean areNotEqual = (point1 != point2);

    return areNotEqual;
}
Private Function overloadedInequalityOperatorExample() As Boolean
    Dim point1 As New Point(20, 30)
    Dim point2 As New Point(45, 70)

    ' Check whether the two Points are not equal, using the overloaded 
    ' inequality operator.
    ' areNotEqual is True.
    Dim areNotEqual As Boolean = (point1 <> point2)

    Return areNotEqual

End Function

설명

XY 좌표는 값을 사용하여 Double 설명합니다. 작동 시 값이 정밀도를 잃을 수 있으므로 Double 논리적으로 동일한 두 Point 값 간의 비교가 실패할 수 있습니다.

적용 대상