This documentation is archived and is not being maintained.

Color.Equals Method

Tests whether two Color structures are identical.

Name Description
Color.Equals (Color) Tests whether a Color structures is identical to this Color structure.
Color.Equals (Object) Tests whether the specified Object is a Color structure and is equivalent to this Color structure.
Color.Equals (Color, Color) Tests whether two Color structures are identical.
Color.Equals (Object, Object) Determines whether the specified Object instances are considered equal.

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.

Show: