StylusPoint.Equals Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Confronta due oggetti StylusPoint per stabilirne l'uguaglianza.
Overload
| Equals(Object) |
Restituisce un valore che indica se l'oggetto specificato equivale all'oggetto StylusPoint. |
| Equals(StylusPoint) |
Restituisce un valore booleano che indica se l'oggetto StylusPoint equivale all'oggetto StylusPoint corrente. |
| Equals(StylusPoint, StylusPoint) |
Restituisce un valore booleano che indica se i due oggetti StylusPoint specificati sono uguali. |
Equals(Object)
Restituisce un valore che indica se l'oggetto specificato equivale all'oggetto 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
Parametri
- o
- Object
L'oggetto StylusPoint da confrontare con l'oggetto StylusPoint corrente.
Restituisce
true se gli oggetti sono uguali. In caso contrario, false.
Esempio
Nell'esempio seguente vengono controllati due StylusPoint oggetti per verificarne l'uguaglianza. Poiché le Xproprietà , Ye PressureFactor in point1 e point2 vengono impostate sullo stesso valore, i due oggetti StylusPoint sono uguali. Viene visualizzato il messaggio.
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
Si applica a
Equals(StylusPoint)
Restituisce un valore booleano che indica se l'oggetto StylusPoint equivale all'oggetto StylusPoint corrente.
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
Parametri
- value
- StylusPoint
L'oggetto StylusPoint da confrontare con l'oggetto StylusPoint corrente.
Restituisce
true se gli oggetti StylusPoint sono uguali; in caso contrario, false.
Implementazioni
Esempio
Nell'esempio seguente vengono controllati due StylusPoint oggetti per verificarne l'uguaglianza. Poiché le Xproprietà , Ye PressureFactor in point1 e point2 vengono impostate sullo stesso valore, i due oggetti StylusPoint sono uguali. Viene visualizzato il messaggio.
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
Si applica a
Equals(StylusPoint, StylusPoint)
Restituisce un valore booleano che indica se i due oggetti StylusPoint specificati sono uguali.
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
Parametri
- stylusPoint1
- StylusPoint
Primo oggetto StylusPoint da confrontare.
- stylusPoint2
- StylusPoint
Secondo oggetto StylusPoint da confrontare.
Restituisce
true se gli oggetti StylusPoint sono uguali; in caso contrario, false.
Esempio
Nell'esempio seguente vengono controllati due StylusPoint oggetti per verificarne l'uguaglianza. Poiché le Xproprietà , Ye PressureFactor in point1 e point2 vengono impostate sullo stesso valore, i due oggetti StylusPoint sono uguali. Viene visualizzato il messaggio.
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