DrawingAttributes.Inequality(DrawingAttributes, DrawingAttributes) Operator
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Bestimmt, ob die angegebenen DrawingAttributes Objekte nicht gleich sind.
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
Parameter
- first
- DrawingAttributes
Das erste DrawingAttributes zu vergleichende Objekt.
- second
- DrawingAttributes
Das zweite DrawingAttributes zu vergleichende Objekt.
Gibt zurück
truewenn die Objekte nicht gleich sind; andernfalls . false
Beispiele
Im folgenden Beispiel werden zwei DrawingAttributes Objekte für Ungleichheiten verglichen. Da die ColorEigenschaften StylusTipHeightund Width Eigenschaften auf attributes1attributes2 dieselben Werte festgelegt sind, wird die Meldung "DrawingAttributes sind gleich" angezeigt.
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
Hinweise
Zwei DrawingAttributes Objekte sind nicht gleich, wenn die folgenden Eigenschaften nicht gleich sind:
Note
Die Inequality Methode überprüft nicht die benutzerdefinierten Eigenschaften auf Gleichheit.
Die entsprechende Methode für diesen Operator ist die Negation von DrawingAttributes.Equals.