DrawingAttributes.Equals(Object) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 DrawingAttributes 개체가 현재 DrawingAttributes 개체와 같은지 여부를 확인합니다.
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
DrawingAttributes 현재 DrawingAttributes 개체와 비교할 개체입니다.
반품
예제
다음 예제에서는 두 DrawingAttributes 개체가 같은지 비교합니다.
Color, StylusTip, Height및 Width 속성 attributes1attributes2 이 동일한 값으로 설정되므로 "DrawingAttributes가 같음" 메시지가 나타납니다.
DrawingAttributes attributes1 = new DrawingAttributes();
attributes1.Color = Colors.Blue;
attributes1.StylusTip = StylusTip.Rectangle;
attributes1.Height = 5;
attributes1.Width = 5;
DrawingAttributes attributes2 = new DrawingAttributes();
attributes2.Color = Colors.Blue;
attributes2.StylusTip = StylusTip.Rectangle;
attributes2.Height = 5;
attributes2.Width = 5;
Dim attributes1 As New DrawingAttributes()
attributes1.Color = Colors.Blue
attributes1.StylusTip = StylusTip.Rectangle
attributes1.Height = 5
attributes1.Width = 5
Dim attributes2 As New DrawingAttributes()
attributes2.Color = Colors.Blue
attributes2.StylusTip = StylusTip.Rectangle
attributes2.Height = 5
attributes2.Width = 5
if (attributes1.Equals(attributes2))
{
MessageBox.Show("The DrawingAttributes are equal");
}
else
{
MessageBox.Show("The DrawingAttributes are not equal");
}
If attributes1.Equals(attributes2) Then
MessageBox.Show("The DrawingAttributes are equal")
Else
MessageBox.Show("The DrawingAttributes are not equal")
End If
설명
다음 속성이 같으면 두 DrawingAttributes 개체가 같습니다.
메모
메서드는 Equals 사용자 지정 속성이 같은지 확인하지 않습니다.