Interlocked.Exchange Method (Int64%, Int64)

Sets a 64-bit signed integer to a specified value and returns the original value, as an atomic operation.

Namespace:  System.Threading
Assembly:  mscorlib (in mscorlib.dll)

[SecuritySafeCriticalAttribute]
public static long Exchange(
	ref long location1,
	long value
)

Parameters

location1
Type: System.Int64%
The variable to set to the specified value.
value
Type: System.Int64
The value to which the location1 parameter is set.

Return Value

Type: System.Int64
The original value of location1.

ExceptionCondition
NullReferenceException

The address of location1 is a null pointer.

Version Notes

Silverlight for Windows Phone Silverlight for Windows Phone

 64-bit members of the Interlocked class are present but not supported.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: