[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Sets a 32-bit signed integer to a specified value and returns the original value, as an atomic operation.
Assembly: mscorlib (in mscorlib.dll)
Public Shared Function Exchange ( _ ByRef location1 As Integer, _ value As Integer _ ) As Integer
public static int Exchange( ref int location1, int value )
public: static int Exchange( int% location1, int value )
static member Exchange : location1:int byref * value:int -> int
public static function Exchange( location1 : int, value : int ) : int
The variable to set to the specified value.
The value to which the location1 parameter is set.
Return ValueType: System..::..Int32
The original value of location1.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.