DrawingAttributes.Inequality(DrawingAttributes, DrawingAttributes) 演算子

定義

指定した DrawingAttributes オブジェクトが等しくないかどうかを判断します。

public:
 static bool operator !=(System::Windows::Ink::DrawingAttributes ^ first, System::Windows::Ink::DrawingAttributes ^ second);
public static bool operator != (System.Windows.Ink.DrawingAttributes first, System.Windows.Ink.DrawingAttributes second);
static member op_Inequality : System.Windows.Ink.DrawingAttributes * System.Windows.Ink.DrawingAttributes -> bool
Public Shared Operator != (first As DrawingAttributes, second As DrawingAttributes) As Boolean

パラメーター

first
DrawingAttributes

比較する最初の DrawingAttributes オブジェクト。

second
DrawingAttributes

比較する 2 番目の DrawingAttributes オブジェクトです。

戻り値

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

次の例では、2 つの DrawingAttributes オブジェクトの不等値を比較します。 および の ColorStylusTipHeight、および Width のプロパティattributes1attributes2は同じ値に設定されているため、"DrawingAttributes は等しい" というメッセージが表示されます。

DrawingAttributes attributes1 = new DrawingAttributes();
attributes1.Color = Colors.Blue;
attributes1.StylusTip = StylusTip.Rectangle;
attributes1.Height = 5;
attributes1.Width = 5;

DrawingAttributes attributes2 = new DrawingAttributes();
attributes2.Color = Colors.Blue;
attributes2.StylusTip = StylusTip.Rectangle;
attributes2.Height = 5;
attributes2.Width = 5;
Dim attributes1 As New DrawingAttributes()
attributes1.Color = Colors.Blue
attributes1.StylusTip = StylusTip.Rectangle
attributes1.Height = 5
attributes1.Width = 5

Dim attributes2 As New DrawingAttributes()
attributes2.Color = Colors.Blue
attributes2.StylusTip = StylusTip.Rectangle
attributes2.Height = 5
attributes2.Width = 5
if (attributes1 != attributes2)
{
    MessageBox.Show("The DrawingAttributes are not equal");
}
else
{
    MessageBox.Show("The DrawingAttributes are equal");
}
If attributes1 <> attributes2 Then
    MessageBox.Show("The DrawingAttributes are not equal")
Else
    MessageBox.Show("The DrawingAttributes are equal")
End If

注釈

次のプロパティが等しくない場合、2 つの DrawingAttributes オブジェクトは等しくありません。

Note

メソッドは Inequality 、カスタム プロパティの等価性をチェックしません。

この演算子の同等のメソッドは、 の DrawingAttributes.Equals否定です。

適用対象