Taal

DrawingAttributes.Inequality(DrawingAttributes, DrawingAttributes) Operator

Definitie

Bepaalt of de opgegeven DrawingAttributes objecten niet gelijk zijn.

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

Parameters

first
DrawingAttributes

Het eerste DrawingAttributes object dat moet worden vergeleken.

second
DrawingAttributes

Het tweede DrawingAttributes object dat moet worden vergeleken.

Retouren

true indien de objecten niet gelijk zijn; anders, false.

Voorbeelden

In het volgende voorbeeld worden twee DrawingAttributes objecten vergeleken voor ongelijkheid. Omdat de Coloreigenschappen , StylusTipen Heighteigenschappen Width zijn ingeschakeld en attributes1attributes2 zijn ingesteld op dezelfde waarden, wordt het bericht 'The DrawingAttributes are equal' weergegeven.

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

Opmerkingen

Twee DrawingAttributes objecten zijn niet gelijk als de volgende eigenschappen niet gelijk zijn:

Note

De Inequality methode controleert de aangepaste eigenschappen niet op gelijkheid.

De equivalente methode voor deze operator is de negatie van DrawingAttributes.Equals.

Van toepassing op