StylusPoint.Equals Método

Definição

Compara dois objetos StylusPoint quanto à igualdade.Compares two StylusPoint objects for equality.

Sobrecargas

Equals(Object)

Retorna um valor que indica se o objeto especificado é igual ao StylusPoint.Returns a value indicating whether the specified object is equal to the StylusPoint.

Equals(StylusPoint)

Retorna um valor booliano que indica se o StylusPoint especificado é igual ao StylusPoint atual.Returns a Boolean value that indicates whether the specified StylusPoint is equal to the current StylusPoint.

Equals(StylusPoint, StylusPoint)

Retorna um valor booliano que indica se os dois objetos StylusPoint especificados são iguais.Returns a Boolean value that indicates whether the two specified StylusPoint objects are equal.

Equals(Object)

Retorna um valor que indica se o objeto especificado é igual ao StylusPoint.Returns a value indicating whether the specified object is equal to the 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

Parâmetros

o
Object

O StylusPoint a ser comparado com o StylusPoint atual.The StylusPoint to compare to the current StylusPoint.

Retornos

true se os objetos forem iguais; caso contrário, false.true if the objects are equal; otherwise, false.

Exemplos

O exemplo a seguir verifica dois objetos StylusPoint para igualdade.The following example checks two StylusPoint objects for equality. Como as propriedades X, Y e PressureFactor em point1 e point2 são definidas com o mesmo valor, os "dois objetos StylusPoint são iguais".Because the X, Y, and PressureFactor properties on point1 and point2 are set to the same value, the "The two StylusPoint objects are equal." A mensagem é exibida.Message appears.

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

Equals(StylusPoint)

Retorna um valor booliano que indica se o StylusPoint especificado é igual ao StylusPoint atual.Returns a Boolean value that indicates whether the specified StylusPoint is equal to the current 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

Parâmetros

value
StylusPoint

O StylusPoint a ser comparado com o StylusPoint atual.The StylusPoint to compare to the current StylusPoint.

Retornos

true se os objetos StylusPoint forem iguais, caso contrário, false.true if the StylusPoint objects are equal; otherwise, false.

Implementações

Exemplos

O exemplo a seguir verifica dois objetos StylusPoint para igualdade.The following example checks two StylusPoint objects for equality. Como as propriedades X, Y e PressureFactor em point1 e point2 são definidas com o mesmo valor, os "dois objetos StylusPoint são iguais".Because the X, Y, and PressureFactor properties on point1 and point2 are set to the same value, the "The two StylusPoint objects are equal." A mensagem é exibida.Message appears.

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

Equals(StylusPoint, StylusPoint)

Retorna um valor booliano que indica se os dois objetos StylusPoint especificados são iguais.Returns a Boolean value that indicates whether the two specified StylusPoint objects are equal.

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

Parâmetros

stylusPoint1
StylusPoint

O primeiro StylusPoint a ser comparado.The first StylusPoint to compare.

stylusPoint2
StylusPoint

O segundo StylusPoint a ser comparado.The second StylusPoint to compare.

Retornos

true se os objetos StylusPoint forem iguais, caso contrário, false.true if the StylusPoint objects are equal; otherwise, false.

Exemplos

O exemplo a seguir verifica dois objetos StylusPoint para igualdade.The following example checks two StylusPoint objects for equality. Como as propriedades X, Y e PressureFactor em point1 e point2 são definidas com o mesmo valor, os "dois objetos StylusPoint são iguais".Because the X, Y, and PressureFactor properties on point1 and point2 are set to the same value, the "The two StylusPoint objects are equal." A mensagem é exibida.Message appears.

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

Aplica-se a