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

System.Threading.Interlocked.Exchange Method

Sets a object reference to refer to a specified object as an atomic operation and returns a reference to the original object. [Edit]

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

Parameters

location1
The variable to set. [Edit]
value
The reference to which location1 is set. [Edit]

Returns

The original value of location1 . [Edit]

Exceptions

TypeReason
ArgumentNullExceptionThe address of location1 is null . [Edit]

Remarks

Documentation for this section has not yet been entered. [Edit]

Requirements

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