Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[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.
Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
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
Parameters
- location1
Type: System. . :: . .Int32%
The variable to set to the specified value.
- value
Type: System. . :: . .Int32
The value to which the location1 parameter is set.
Return Value
Type: System. . :: . .Int32
The original value of location1.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.