Click or drag to resize
Interlocked Class
Provides atomic operations for variables that are shared by multiple threads.
Inheritance Hierarchy
SystemObject
  System.ThreadingInterlocked

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static class Interlocked
Methods
  NameDescription
Public methodStatic memberCompareExchange(Double, Double, Double)
Compares two double-precision floating point numbers for equality and, if they are equal, replaces one of the values.
Public methodStatic memberCompareExchange(Int32, Int32, Int32)
Compares two 32-bit signed integers for equality and, if they are equal, replaces one of the values.
Public methodStatic memberCompareExchange(Int64, Int64, Int64)
Compares two 64-bit signed integers for equality and, if they are equal, replaces one of the values.
Public methodStatic memberCompareExchange(IntPtr, IntPtr, IntPtr)
Compares two platform-specific handles or pointers for equality and, if they are equal, replaces one of them.
Public methodStatic memberCompareExchange(Object, Object, Object)
Compares two objects for reference equality and, if they are equal, replaces one of the objects.
Public methodStatic memberCompareExchange(Single, Single, Single)
Compares two single-precision floating point numbers for equality and, if they are equal, replaces one of the values.
Public methodStatic memberCompareExchangeT(T, T, T)
Compares two instances of the specified reference type T for equality and, if they are equal, replaces one of them.
Top
See Also