NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Interlocked.CompareExchange

Compares two values for equality and replaces the destination value if they are equal.

Overload List

Compares two integer values for equality and replaces the destination value if they are equal.

[Visual Basic] Overloads Public Shared Function CompareExchange(Integer, Integer, Integer) As Integer
[C#] public static int CompareExchange(int, int, int);
[C++] public: static int CompareExchange(int*, int*, int*);
[JScript] public static function CompareExchange(int, int, int) : int;

Compares two floating point values for equality and replaces the destination value if they are equal.

[Visual Basic] Overloads Public Shared Function CompareExchange(Single, Single, Single) As Single
[C#] public static float CompareExchange(float, float, float);
[C++] public: static float CompareExchange(float*, float*, float*);
[JScript] public static function CompareExchange(float, float, float) : float;

Compares two Objects for equality and replaces the destination value if they are equal.

[Visual Basic] Overloads Public Shared Function CompareExchange(Object, Object, Object) As Object
[C#] public static object CompareExchange(Object, Object, Object);
[C++] public: static Object* CompareExchange(Object*, Object*, Object*);
[JScript] public static function CompareExchange(Object, Object, Object) : Object;

See Also

Interlocked Class | Interlocked Members | System.Threading Namespace