Size3D.Equals 메서드

정의

Size3D 구조체가 같은지 여부를 비교합니다.Compares two Size3D structures for equality.

오버로드

Equals(Object)

지정된 개체가 Size3D 구조체인지 확인하고, 지정된 XY, ZObject 속성이 이 X 구조체의 Y, ZSize3D 속성과 같은지 확인합니다.Determines whether the specified object is a Size3D structure and whether the X, Y and Z properties of the specified Object are equal to the X, Y and Z properties of this Size3D structure.

Equals(Size3D)

Size3D 구조체가 같은지 여부를 비교합니다.Compares two Size3D structures for equality.

Equals(Size3D, Size3D)

Size3D 구조체가 같은지 여부를 비교합니다.Compares two Size3D structures for equality. 해당 Size3D, XY 속성의 값이 같으면 두 Z 구조체가 같습니다.Two Size3D structures are equal if the values of their X, Y, and Z properties are the same.

Equals(Object)

지정된 개체가 Size3D 구조체인지 확인하고, 지정된 XY, ZObject 속성이 이 X 구조체의 Y, ZSize3D 속성과 같은지 확인합니다.Determines whether the specified object is a Size3D structure and whether the X, Y and Z properties of the specified Object are equal to the X, Y and Z properties of this Size3D structure.

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입니다.The Object to compare.

반환

인스턴스가 서로 같으면 true이고, 그렇지 않으면 false입니다.true if instances are equal; otherwise, false.

oSize3D 구조체이고 이 Size3D 구조체와도 같으면 true이고, 그렇지 않으면 false입니다.true if o is a Size3D structure and is identical with this Size3D structure; otherwise, false.

예제

다음 예제에서는 확인 하는 방법을 보여 줍니다는 ObjectSize3D 구조체가 같은지 합니다.The following example shows how to check if an Object and a Size3D structure are equal.

// Checks if an Object and a Size3D structure are equal using the non-static Equals method. 
// Returns a Boolean.

// Declaring Size3D structure without initializing x,y,z values
Size3D size1 = new Size3D();

// Declaring Size3D structure and initializing x,y,z values
Size3D size2 = new Size3D(5, 10, 15);
Boolean areEqual;

// Assigning values to size1
size1.X = 2;
size1.Y = 4;
size1.Z = 6;

areEqual = size1.Equals(size2);
// areEqual is False

// Displaying Results
syntaxString = "areEqual = Size3D.Equals(size1, size2);";
resultType = "Boolean";
operationString = "Checking if an object and a Size3D structure are equal";
ShowResults(areEqual.ToString(), syntaxString, resultType, operationString);
' Checks if an Object and a Size3D structure are equal using the non-static Equals method. 
' Returns a Boolean.

' Declaring Size3D structure without initializing x,y,z values
Dim size1 As New Size3D()

' Declaring Size3D structure and initializing x,y,z values
Dim size2 As New Size3D(5, 10, 15)
Dim areEqual As Boolean

' Assigning values to size1
size1.X = 2
size1.Y = 4
size1.Z = 6

areEqual = size1.Equals(size2)
' areEqual is False

' Displaying Results
syntaxString = "areEqual = Size3D.Equals(size1, size2)"
resultType = "Boolean"
operationString = "Checking if an object and a Size3D structure are equal"
ShowResults(areEqual.ToString(), syntaxString, resultType, operationString)

설명

때문에 Double 간 비교에서 산술 작업을 수행할 때 값 정밀도 떨어질 수 Size3D 논리적으로 동일한 인스턴스가 실패할 수 있습니다.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.

추가 정보

Equals(Size3D)

Size3D 구조체가 같은지 여부를 비교합니다.Compares two Size3D structures for equality.

public:
 bool Equals(System::Windows::Media::Media3D::Size3D value);
public bool Equals (System.Windows.Media.Media3D.Size3D value);
override this.Equals : System.Windows.Media.Media3D.Size3D -> bool
Public Function Equals (value As Size3D) As Boolean

매개 변수

value
Size3D

이 인스턴스와 비교할 Size3D의 인스턴스입니다.The instance of Size3D to compare to this instance.

반환

인스턴스가 서로 같으면 true이고, 그렇지 않으면 false입니다.true if instances are equal; otherwise, false.

설명

때문에 Double 간 비교에서 산술 작업을 수행할 때 값 정밀도 떨어질 수 Size3D 논리적으로 동일한 인스턴스가 실패할 수 있습니다.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.

추가 정보

Equals(Size3D, Size3D)

Size3D 구조체가 같은지 여부를 비교합니다.Compares two Size3D structures for equality. 해당 Size3D, XY 속성의 값이 같으면 두 Z 구조체가 같습니다.Two Size3D structures are equal if the values of their X, Y, and Z properties are the same.

public:
 static bool Equals(System::Windows::Media::Media3D::Size3D size1, System::Windows::Media::Media3D::Size3D size2);
public static bool Equals (System.Windows.Media.Media3D.Size3D size1, System.Windows.Media.Media3D.Size3D size2);
static member Equals : System.Windows.Media.Media3D.Size3D * System.Windows.Media.Media3D.Size3D -> bool
Public Shared Function Equals (size1 As Size3D, size2 As Size3D) As Boolean

매개 변수

size1
Size3D

비교할 첫 번째 Size3D 구조체입니다.The first Size3D structure to compare.

size2
Size3D

비교할 두 번째 Size3D 구조체입니다.The second Size3D structure to compare.

반환

인스턴스가 서로 같으면 true이고, 그렇지 않으면 false입니다.true if instances are equal; otherwise, false.

size1size2X, YZ 구성 요소가 같으면 true이고, 그렇지 않으면 false입니다.true if the X, Y, and Z components of size1 and size2 are equal; otherwise, false.

예제

다음 예제에서는 두 가지 경우를 확인 하는 방법을 보여 줍니다 Size3D 구조체가 동일 합니다.The following example shows how to check if two Size3D structures are equal.

private bool size3DEqualityExample()
{

    // Checks if two Size3D structures are equal using the static Equals method. 
    // Returns a Boolean.

    // Declaring Size3D structure without initializing x,y,z values
    Size3D size1 = new Size3D();

    // Delcaring Size3D structure and initializing x,y,z values
    Size3D size2 = new Size3D(5, 10, 15);
    Boolean areEqual;

    // Assigning values to size1
    size1.X = 2;
    size1.Y = 4;
    size1.Z = 6;

    // checking for equality
    areEqual = Size3D.Equals(size1, size2);

    // areEqual is False
    return areEqual;
}

설명

때문에 Double 간 비교에서 산술 작업을 수행할 때 값 정밀도 떨어질 수 Size3D 논리적으로 동일한 인스턴스가 실패할 수 있습니다.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.

추가 정보

적용 대상