StylusPoint.Equals Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Compara dois StylusPoint objetos para igualdade.
Sobrecargas
| Name | Description |
|---|---|
| Equals(Object) |
Devolve um valor que indica se o objeto especificado é igual ao StylusPoint. |
| Equals(StylusPoint) |
Devolve um valor booleano que indica se o especificado StylusPoint é igual ao atual StylusPoint. |
| Equals(StylusPoint, StylusPoint) |
Devolve um valor booleano que indica se os dois objetos especificados StylusPoint são iguais. |
Equals(Object)
Devolve um valor que indica se o objeto especificado é igual ao 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 para comparar com o atual StylusPoint.
Devoluções
true se os objetos forem iguais; caso contrário, false.
Exemplos
O exemplo seguinte verifica a igualdade de dois StylusPoint objetos. Como os X, , e Y as propriedades em PressureFactor e point1 estão definidos com o mesmo valor, os "Os dois objetos StylusPoint são point2iguais." A mensagem aparece.
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
Aplica-se a
Equals(StylusPoint)
Devolve um valor booleano que indica se o especificado StylusPoint é igual ao atual 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 para comparar com o atual StylusPoint.
Devoluções
true se os StylusPoint objetos forem iguais; caso contrário, false.
Implementações
Exemplos
O exemplo seguinte verifica a igualdade de dois StylusPoint objetos. Como os X, , e Y as propriedades em PressureFactor e point1 estão definidos com o mesmo valor, os "Os dois objetos StylusPoint são point2iguais." A mensagem aparece.
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
Aplica-se a
Equals(StylusPoint, StylusPoint)
Devolve um valor booleano que indica se os dois objetos especificados StylusPoint são iguais.
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 comparar.
- stylusPoint2
- StylusPoint
O segundo StylusPoint para comparar.
Devoluções
true se os StylusPoint objetos forem iguais; caso contrário, false.
Exemplos
O exemplo seguinte verifica a igualdade de dois StylusPoint objetos. Como os X, , e Y as propriedades em PressureFactor e point1 estão definidos com o mesmo valor, os "Os dois objetos StylusPoint são point2iguais." A mensagem aparece.
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