StylusPoint.Equality(StylusPoint, StylusPoint) Operator
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Jämför två angivna StylusPoint objekt och avgör om de är lika.
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
Parametrar
- stylusPoint1
- StylusPoint
Den första StylusPoint att jämföra.
- stylusPoint2
- StylusPoint
Den andra StylusPoint att jämföra.
Returer
true om objekten StylusPoint är lika, annars false.
Exempel
I följande exempel kontrolleras två StylusPoint objekt för likhet.
XEftersom egenskaperna , Yoch PressureFactor på och point1 är inställda på point2 samma värde är "De två StylusPoint-objekten lika". Meddelandet visas.
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
Kommentarer
Motsvarande metod för den här operatorn är StylusPoint.Equals(StylusPoint, StylusPoint)