Color.op_Inequality Method

Tests whether two Color structures are not identical.

Namespace: System.Windows.Media
Assembly: PresentationCore (in presentationcore.dll)

public static bool operator != (
	Color color1,
	Color color2
You cannot use methods in XAML.



The first Color structure to compare.


The second Color structure to compare.

Return Value

true if color1 and color2 are not equal; otherwise, false.

Floating point values can acquire a small degree of error when they are operated upon. The Equals method, the overloaded equality operator, and the overloaded inequality operator will will not compensate for this and thus may not return the expected boolean result.

The AreClose method uses a fuzzy equality algorithm that will compensate for this floating point arithmetic error by returning true for a comparison of two Color structures that are logically true, but whose values may differ by a miniscule amount.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0