Compares two floating point values for equality and replaces the destination value if they are equal.
[Visual Basic] Overloads Public Shared Function CompareExchange( _ ByRef location1 As Single, _ ByVal value As Single, _ ByVal comparand As Single _ ) As Single [C#] public static float CompareExchange( ref float location1, float value, float comparand ); [C++] public: static float CompareExchange( float** location1, float value, float comparand ); [JScript] public static function CompareExchange( location1 : float, value : float, comparand : float ) : float;
The original destination value.
If comparand and location1 are equal, then a value (value) is stored in the destination. Otherwise, no operation is performed. The compare and exchange operations are performed in an atomic operation.
Interlocked Class | Interlocked Members | System.Threading Namespace | Interlocked.CompareExchange Overload List