Click or drag to resize

Interlocked Methods

The Interlocked type exposes the following members.

Methods
 NameDescription
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(Object, Object, Object) Compares two objects for reference equality and, if they are equal, replaces one of the objects
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.
Public methodStatic memberDecrement Decrements a specified variable and stores the result, as an atomic operation.
Public methodStatic memberExchange(Int32, Int32) Sets a 32-bit signed integer to a specified value and returns the original value, as an atomic operation.
Public methodStatic memberExchange(Object, Object) Sets an object to a specified value and returns a reference to the original object, as an atomic operation.
Public methodStatic memberExchangeT(T, T) Sets a variable of the specified type T to a specified value and and returns the original value, as an atomic operation.
Public methodStatic memberIncrement Increments a specified variable and stores the result, as an atomic operation.
Top
See Also