Size3D.Inequality(Size3D, Size3D) Operator
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Parameters
Returns
true
if the X, Y and Z coordinates of size1
and size2
are different; otherwise, false
.
Examples
The following example shows how to use the overloaded inequality operator to check if two Size3D structures are not equal.
// 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)
Remarks
Because Double values can lose precision when arithmetic operations are performed on them, a comparison between two Size3D instances that are logically equal might fail.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET