StylusPoint.Equality(StylusPoint, StylusPoint) 演算子

定義

指定した 2 つの StylusPoint オブジェクトを比較し、それらが等しいかどうかを確認します。

public:
 static bool operator ==(System::Windows::Input::StylusPoint stylusPoint1, System::Windows::Input::StylusPoint stylusPoint2);
public static bool operator == (System.Windows.Input.StylusPoint stylusPoint1, System.Windows.Input.StylusPoint stylusPoint2);
static member ( = ) : System.Windows.Input.StylusPoint * System.Windows.Input.StylusPoint -> bool
Public Shared Operator == (stylusPoint1 As StylusPoint, stylusPoint2 As StylusPoint) As Boolean

パラメーター

stylusPoint1
StylusPoint

比較対象となる、最初の StylusPoint

stylusPoint2
StylusPoint

比較対象となる 2 番目の StylusPoint

戻り値

StylusPoint オブジェクトが等しい場合は true。それ以外の場合は false

次の例では、2 つの StylusPoint オブジェクトの等価性をチェックします。 および の Xpoint1point2Y、および PressureFactor プロパティは同じ値に設定されているため、"2 つの StylusPoint オブジェクトは等しい" です。メッセージが表示されます。

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 (point1 == point2)
{
    MessageBox.Show("The two StylusPoint objects are equal.");
}
else
{
    MessageBox.Show("The two StylusPoint objects are not equal.");
}
If point1 = point2 Then
    MessageBox.Show("The two StylusPoint objects are equal.")
Else
    MessageBox.Show("The two StylusPoint objects are not equal.")
End If

注釈

この演算子の同等のメソッドは 次のようになります。 StylusPoint.Equals(StylusPoint, StylusPoint)

適用対象