DrawingAttributes.Equality(DrawingAttributes, DrawingAttributes) 연산자

정의

지정한 DrawingAttributes 개체가 동일한지 여부를 확인합니다.

public:
 static bool operator ==(System::Windows::Ink::DrawingAttributes ^ first, System::Windows::Ink::DrawingAttributes ^ second);
public static bool operator == (System.Windows.Ink.DrawingAttributes first, System.Windows.Ink.DrawingAttributes second);
static member ( = ) : System.Windows.Ink.DrawingAttributes * System.Windows.Ink.DrawingAttributes -> bool
Public Shared Operator == (first As DrawingAttributes, second As DrawingAttributes) As Boolean

매개 변수

first
DrawingAttributes

비교할 첫 번째 DrawingAttributes 개체입니다.

second
DrawingAttributes

비교할 두 번째 DrawingAttributes 개체입니다.

반환

Boolean

개체가 동일하면 true이고, 그렇지 않으면 false입니다.

예제

다음 예제에서는 두 개의 비교 DrawingAttributes 같음에 대 한 개체입니다. 때문에 합니다 Color, StylusTipHeight, 및 Width 속성을 attributes1attributes2 "DrawingAttributes are equal" 메시지가 표시 되는 동일한 값으로 설정 됩니다.

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 == attributes2)
{
    MessageBox.Show("The DrawingAttributes are equal");
}
else
{
    MessageBox.Show("The DrawingAttributes are not equal");
}
If attributes1 = attributes2 Then
    MessageBox.Show("The DrawingAttributes are equal")
Else
    MessageBox.Show("The DrawingAttributes are not equal")
End If

설명

DrawingAttributes 개체는 다음 속성이 같으면 같습니다.

참고

Equality 메서드 같음에 대 한 사용자 지정 속성을 확인 하지 않습니다.

이 연산자에 대 한 해당 메서드는 DrawingAttributes.Equals합니다.

적용 대상