Size3D.Inequality(Size3D, Size3D) 연산자

정의

Size3D 구조체가 다른지 여부를 비교합니다. 해당 Size3D, XY 속성의 값이 서로 다르면 두 Z 구조체가 다릅니다.

public:
 static bool operator !=(System::Windows::Media::Media3D::Size3D size1, System::Windows::Media::Media3D::Size3D size2);
public static bool operator != (System.Windows.Media.Media3D.Size3D size1, System.Windows.Media.Media3D.Size3D size2);
static member op_Inequality : System.Windows.Media.Media3D.Size3D * System.Windows.Media.Media3D.Size3D -> bool
Public Shared Operator != (size1 As Size3D, size2 As Size3D) As Boolean

매개 변수

size1
Size3D

비교할 첫 번째 Size3D 구조체입니다.

size2
Size3D

비교할 두 번째 Size3D 구조체입니다.

반환

Boolean

size1size2X, YZ 좌표가 서로 다르면 true이고, 그렇지 않으면 false입니다.

예제

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

// Checks if two Size3D structures are not equal using the overloaded != operator. 
// Returns a Boolean.

Size3D size1 = new Size3D(2, 4, 6);
Size3D size2 = new Size3D(5, 10, 15);
Boolean areNotEqual;

areNotEqual = size1 != size2;
// areNotEqual is True

// Displaying Results
syntaxString = "areNotEqual = size1 != size2;";
resultType = "Boolean";
operationString = "Checking if two Size3D structures are not equal";
ShowResults(areNotEqual.ToString(), syntaxString, resultType, operationString);
' Checks if two Size3D structures are not equal using the overloaded != operator. 
' Returns a Boolean.

Dim size1 As New Size3D(2, 4, 6)
Dim size2 As New Size3D(5, 10, 15)
Dim areNotEqual As Boolean

areNotEqual = size1 <> size2
' areNotEqual is True

' Displaying Results
syntaxString = "areNotEqual = size1 != size2"
resultType = "Boolean"
operationString = "Checking if two Size3D structures are not equal"
ShowResults(areNotEqual.ToString(), syntaxString, resultType, operationString)

설명

산술 연산을 수행할 때 값이 정밀도를 잃을 수 있으므로 Double 논리적으로 같은 두 Size3D 인스턴스를 비교하지 못할 수 있습니다.

적용 대상