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.Exchange

Sets a variable to a specified value as an atomic operation.

Overload List

Sets a floating point variable to a specified value as an atomic operation and returns the original value.

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

Sets an Object variable to a specified value as an atomic operation and returns the original value.

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

Sets an integer variable to a specified value as an atomic operation and returns the original value.

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

See Also

Interlocked Class | Interlocked Members | System.Threading Namespace