Mono Class Library: System.Threading.Interlocked Overview | Members

System.Threading.Interlocked.Exchange Method

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

[System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)]
public static int Exchange (ref int location1, int value)

Parameters

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

Returns

A int containing the value of location1 before the exchange.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0