StylusPoint.Equals Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Vergelijkt twee StylusPoint objecten voor gelijkheid.
Overloads
| Name | Description |
|---|---|
| Equals(Object) |
Retourneert een waarde die aangeeft of het opgegeven object gelijk is aan de StylusPoint. |
| Equals(StylusPoint) |
Retourneert een Booleaanse waarde die aangeeft of de opgegeven StylusPoint gelijk is aan de huidige StylusPoint. |
| Equals(StylusPoint, StylusPoint) |
Retourneert een Booleaanse waarde die aangeeft of de twee opgegeven StylusPoint objecten gelijk zijn. |
Equals(Object)
Retourneert een waarde die aangeeft of het opgegeven object gelijk is aan de StylusPoint.
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
Parameters
- o
- Object
De StylusPoint te vergelijken met de huidige StylusPoint.
Retouren
true indien de objecten gelijk zijn; anders, false.
Voorbeelden
In het volgende voorbeeld worden twee StylusPoint objecten gecontroleerd op gelijkheid. Omdat de X, Yen eigenschappen zijn PressureFactor ingeschakeld en point1point2 zijn ingesteld op dezelfde waarde, zijn de twee StylusPoint-objecten gelijk. Het bericht wordt weergegeven.
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 (point2.Equals(point1))
{
MessageBox.Show("The two StylusPoint objects are equal.");
}
else
{
MessageBox.Show("The two StylusPoint objects are not equal.");
}
If point2.Equals(point1) Then
MessageBox.Show("The two StylusPoint objects are equal.")
Else
MessageBox.Show("The two StylusPoint objects are not equal.")
End If
Van toepassing op
Equals(StylusPoint)
Retourneert een Booleaanse waarde die aangeeft of de opgegeven StylusPoint gelijk is aan de huidige StylusPoint.
public:
virtual bool Equals(System::Windows::Input::StylusPoint value);
public bool Equals(System.Windows.Input.StylusPoint value);
override this.Equals : System.Windows.Input.StylusPoint -> bool
Public Function Equals (value As StylusPoint) As Boolean
Parameters
- value
- StylusPoint
De StylusPoint te vergelijken met de huidige StylusPoint.
Retouren
trueals de StylusPoint objecten gelijk zijn; anders. false
Implementeringen
Voorbeelden
In het volgende voorbeeld worden twee StylusPoint objecten gecontroleerd op gelijkheid. Omdat de X, Yen eigenschappen zijn PressureFactor ingeschakeld en point1point2 zijn ingesteld op dezelfde waarde, zijn de twee StylusPoint-objecten gelijk. Het bericht wordt weergegeven.
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 (point2.Equals(point1))
{
MessageBox.Show("The two StylusPoint objects are equal.");
}
else
{
MessageBox.Show("The two StylusPoint objects are not equal.");
}
If point2.Equals(point1) Then
MessageBox.Show("The two StylusPoint objects are equal.")
Else
MessageBox.Show("The two StylusPoint objects are not equal.")
End If
Van toepassing op
Equals(StylusPoint, StylusPoint)
Retourneert een Booleaanse waarde die aangeeft of de twee opgegeven StylusPoint objecten gelijk zijn.
public:
static bool Equals(System::Windows::Input::StylusPoint stylusPoint1, System::Windows::Input::StylusPoint stylusPoint2);
public static bool Equals(System.Windows.Input.StylusPoint stylusPoint1, System.Windows.Input.StylusPoint stylusPoint2);
static member Equals : System.Windows.Input.StylusPoint * System.Windows.Input.StylusPoint -> bool
Public Shared Function Equals (stylusPoint1 As StylusPoint, stylusPoint2 As StylusPoint) As Boolean
Parameters
- stylusPoint1
- StylusPoint
De eerste StylusPoint die moet worden vergeleken.
- stylusPoint2
- StylusPoint
De tweede StylusPoint die moet worden vergeleken.
Retouren
trueals de StylusPoint objecten gelijk zijn; anders. false
Voorbeelden
In het volgende voorbeeld worden twee StylusPoint objecten gecontroleerd op gelijkheid. Omdat de X, Yen eigenschappen zijn PressureFactor ingeschakeld en point1point2 zijn ingesteld op dezelfde waarde, zijn de twee StylusPoint-objecten gelijk. Het bericht wordt weergegeven.
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 (StylusPoint.Equals(point1, point2))
{
MessageBox.Show("The two StylusPoint objects are equal.");
}
else
{
MessageBox.Show("The two StylusPoint objects are not equal.");
}
If StylusPoint.Equals(point1, point2) Then
MessageBox.Show("The two StylusPoint objects are equal.")
Else
MessageBox.Show("The two StylusPoint objects are not equal.")
End If