Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Interlocked.CompareExchange Method

Compares two values for equality and, if they are equal, replaces one of the values.

Name Description
Interlocked.CompareExchange (Double, Double, Double) Compares two double-precision floating point numbers for equality and, if they are equal, replaces one of the values.
Interlocked.CompareExchange (Int32, Int32, Int32) Compares two 32-bit signed integers for equality and, if they are equal, replaces one of the values.

Supported by the .NET Compact Framework.

Interlocked.CompareExchange (Int64, Int64, Int64) Compares two 64-bit signed integers for equality and, if they are equal, replaces one of the values.
Interlocked.CompareExchange (IntPtr, IntPtr, IntPtr) Compares two platform-specific handles or pointers for equality and, if they are equal, replaces one of them.
Interlocked.CompareExchange (Object, Object, Object) Compares two objects for reference equality and, if they are equal, replaces one of the objects.

Supported by the .NET Compact Framework.

Interlocked.CompareExchange (Single, Single, Single) Compares two single-precision floating point numbers for equality and, if they are equal, replaces one of the values.
Interlocked.CompareExchange (T, T, T)  

Supported by the .NET Compact Framework.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft