StylusPoint.Equals Metod

Definition

Jämför två StylusPoint objekt för likhet.

Överlagringar

Name Description
Equals(Object)

Returnerar ett värde som anger om det angivna objektet är lika StylusPointmed .

Equals(StylusPoint)

Returnerar ett booleskt värde som anger om den angivna StylusPoint är lika med den aktuella StylusPoint.

Equals(StylusPoint, StylusPoint)

Returnerar ett booleskt värde som anger om de två angivna StylusPoint objekten är lika med.

Equals(Object)

Returnerar ett värde som anger om det angivna objektet är lika StylusPointmed .

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

Parametrar

o
Object

Att StylusPoint jämföra med den aktuella StylusPoint.

Returer

trueom objekten ä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 (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

Gäller för

Equals(StylusPoint)

Returnerar ett booleskt värde som anger om den angivna StylusPoint är lika med den aktuella 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

Parametrar

value
StylusPoint

Att StylusPoint jämföra med den aktuella StylusPoint.

Returer

true om objekten StylusPoint är lika, annars false.

Implementeringar

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 (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

Gäller för

Equals(StylusPoint, StylusPoint)

Returnerar ett booleskt värde som anger om de två angivna StylusPoint objekten är lika med.

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

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 (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

Gäller för