Point.Inequality(Point, Point) 연산자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
같지 않음에 대한 두 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 있고 같 falsepoint1 고 point2 좌표가 있는 경우 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
설명
점 X 및 Y 좌표는 값을 사용하여 Double 설명합니다. 작동 시 값이 정밀도를 잃을 수 있으므로 Double 논리적으로 동일한 두 Point 값 간의 비교가 실패할 수 있습니다.