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);

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



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

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

   

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



PointF.op_Inequality メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS