StylusPoint.Equals Metodo

Definizione

Confronta due oggetti StylusPoint per stabilirne l'uguaglianza.

Overload

Nome Descrizione
Equals(Object)

Restituisce un valore che indica se l'oggetto specificato è uguale a StylusPoint.

Equals(StylusPoint)

Restituisce un valore booleano che indica se l'oggetto specificato StylusPoint è uguale all'oggetto corrente StylusPoint.

Equals(StylusPoint, StylusPoint)

Restituisce un valore booleano che indica se i due oggetti specificati StylusPoint sono uguali.

Equals(Object)

Restituisce un valore che indica se l'oggetto specificato è uguale a 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

Oggetto StylusPoint da confrontare con l'oggetto corrente StylusPoint.

Valori restituiti

true se gli oggetti sono uguali; in caso contrario, false.

Esempio

Nell'esempio seguente vengono controllati due StylusPoint oggetti per verificare l'uguaglianza. Poiché le Xproprietà , Ye PressureFactor in point1 e point2 sono 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 specificato StylusPoint è uguale all'oggetto corrente 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

Parametri

value
StylusPoint

Oggetto StylusPoint da confrontare con l'oggetto corrente StylusPoint.

Valori restituiti

true se gli StylusPoint oggetti sono uguali; in caso contrario, false.

Implementazioni

Esempio

Nell'esempio seguente vengono controllati due StylusPoint oggetti per verificare l'uguaglianza. Poiché le Xproprietà , Ye PressureFactor in point1 e point2 sono 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 specificati StylusPoint 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 StylusPoint oggetto da confrontare.

stylusPoint2
StylusPoint

StylusPoint Secondo da confrontare.

Valori restituiti

true se gli StylusPoint oggetti sono uguali; in caso contrario, false.

Esempio

Nell'esempio seguente vengono controllati due StylusPoint oggetti per verificare l'uguaglianza. Poiché le Xproprietà , Ye PressureFactor in point1 e point2 sono 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

Si applica a