PointF.op_Inequality メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > PointF.op_Inequality メソッドの意味・解説 

PointF.op_Inequality メソッド

指定した点の座標が等しくないかどうかを確認します。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Shared Operator <> ( _
    left As PointF, _
    right As PointF _
) As Boolean
public static bool operator
 != (
    PointF left,
    PointF right
)
public:
static bool operator != (
    PointF left, 
    PointF right
)
J# では、オーバーロードされた演算子は使用できません。
JScriptでは、 オーバーロードされた演算子は使用できますが、新規に宣言することはできません。

パラメータ

left

比較対象の PointF。

right

比較対象の PointF。

戻り値
left および right の X 値および Y 値が等しくない場合は true。それ以外の場合は false。

使用例使用例

op_Inequality 演算子を使用する方法を次のコード例に示します。この例を実行するには、次のコードを Windows フォームに貼り付けます。フォームの Paint イベントを処理し、AddExample を呼び出し、e を PaintEventArgs 値として渡します。

Private Sub AddExample(ByVal
 e As PaintEventArgs) 
    Dim size1 As New SizeF(120.5F,
 30.5F)
    Dim point1 As New PointF(20.5F,
 20F)
    Dim rect1 As New RectangleF(point1,
 size1)
    Dim point2 As New PointF(rect1.Right,
 rect1.Bottom)
    If point2 <> PointF.Add(point1, size1) Then
        e.Graphics.DrawString("They are not equal",
 Me.Font, Brushes.Red, rect1)
    Else
        e.Graphics.DrawString("They are equal", Me.Font,
 Brushes.Black, rect1)
    End If

End Sub
private void AddExample(PaintEventArgs e)
{
    PointF point1 = new PointF(120.5F, 120F);
    SizeF size1 = new SizeF(20.5F, 20.5F);
    RectangleF rect1 = new RectangleF(point1, size1);
    PointF point2 = new PointF(rect1.Right, rect1.Bottom);
    if (point2 != PointF.Add(point1, size1))
        e.Graphics.DrawString("They are not equal", this.Font,
 Brushes.Red, rect1);
    else
        e.Graphics.DrawString("They are equal", this.Font,
 Brushes.Black, rect1);

}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

PointF.op_Inequality メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



PointF.op_Inequality メソッドのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS