StylusPoint.Equality(StylusPoint, StylusPoint) Operátor

Definice

Porovná dva zadané StylusPoint objekty a určí, zda jsou si rovny.

public:
 static bool operator ==(System::Windows::Input::StylusPoint stylusPoint1, System::Windows::Input::StylusPoint stylusPoint2);
public static bool operator == (System.Windows.Input.StylusPoint stylusPoint1, System.Windows.Input.StylusPoint stylusPoint2);
static member ( = ) : System.Windows.Input.StylusPoint * System.Windows.Input.StylusPoint -> bool
Public Shared Operator == (stylusPoint1 As StylusPoint, stylusPoint2 As StylusPoint) As Boolean

Parametry

stylusPoint1
StylusPoint

První StylusPoint k porovnání.

stylusPoint2
StylusPoint

Sekunda StylusPoint k porovnání.

Návraty

truepokud jsou StylusPoint si objekty rovny, v opačném případě . false

Příklady

Následující příklad zkontroluje rovnost dvou StylusPoint objektů. XVzhledem k tomu, že vlastnosti , Ya PressureFactor na point1 a point2 jsou nastaveny na stejnou hodnotu, "Dva objekty StylusPoint jsou si rovny". Zobrazí se zpráva.

StylusPoint point1 = new StylusPoint();
StylusPoint point2 = new StylusPoint();

point1.X = 150;
point1.Y = 400;
point1.PressureFactor = 0.45f;

point2.X = 150;
point2.Y = 400;
point2.PressureFactor = 0.45f;
Dim point1 As New StylusPoint()
Dim point2 As New StylusPoint()

point1.X = 150
point1.Y = 400
point1.PressureFactor = 0.45F

point2.X = 150
point2.Y = 400
point2.PressureFactor = 0.45F
if (point1 == point2)
{
    MessageBox.Show("The two StylusPoint objects are equal.");
}
else
{
    MessageBox.Show("The two StylusPoint objects are not equal.");
}
If point1 = point2 Then
    MessageBox.Show("The two StylusPoint objects are equal.")
Else
    MessageBox.Show("The two StylusPoint objects are not equal.")
End If

Poznámky

Ekvivalentní metoda pro tento operátor je StylusPoint.Equals(StylusPoint, StylusPoint)

Platí pro