This documentation is archived and is not being maintained.

Interlocked.Exchange Method

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

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method Static member Exchange(Double, Double) Sets a double-precision floating point number to a specified value and returns the original value, as an atomic operation.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework Exchange(Int32, Int32) Sets a 32-bit signed integer to a specified value and returns the original value, as an atomic operation.
Public method Static member Exchange(Int64, Int64) Sets a 64-bit signed integer to a specified value and returns the original value, as an atomic operation.
Public method Static member Exchange(IntPtr, IntPtr) Sets a platform-specific handle or pointer to a specified value and returns the original value, as an atomic operation.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework Exchange(Object, Object) Sets an object to a specified value and returns a reference to the original object, as an atomic operation.
Public method Static member Exchange(Single, Single) Sets a single-precision floating point number to a specified value and returns the original value, as an atomic operation.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework Exchange<T>(T, T) Sets a variable of the specified type T to a specified value and returns the original value, as an atomic operation.
Top
Show: