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 (Int32, Int32)

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

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

Parameters

location1
The variable to set to the supplied value as an atomic operation.
value
The value to which location1 is set.

Return Value

The original (unset) value of the location1 variable.

See Also

Interlocked Class | Interlocked Members | System.Threading Namespace | Interlocked.Exchange Overload List