Class for providing atomic operations for variables that are shared by multiple threads.
Inheritance Hierarchy Namespace: Crestron.SimplSharpAssembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntaxpublic static class Interlocked
The Interlocked type exposes the following members.
Methods| | Name | Description |
|---|
  | CompareExchange(Int32, Int32, Int32) |
Compares two 32-bit signed integers for equality and, if they are equal,replaces one of the values.
|
  | CompareExchange(Object, Object, Object) |
Compares two objects for reference equality and, if they are equal, replaces one of the objects
|
  | CompareExchangeT(T, T, T) |
Compares two instances of the specified reference type T for equality and,if they are equal, replaces one of them.
|
  | Decrement |
Decrements a specified variable and stores the result, as an atomic operation.
|
  | Exchange(Int32, Int32) |
Sets a 32-bit signed integer to a specified value and returns the original
value, as an atomic operation.
|
  | Exchange(Object, Object) |
Sets an object to a specified value and returns a reference to the original
object, as an atomic operation.
|
  | ExchangeT(T, T) |
Sets a variable of the specified type T to a specified value and and returns the original value, as an atomic operation.
|
  | Increment |
Increments a specified variable and stores the result, as an atomic operation.
|
TopVersion Information
.NET
Supported in: 6.0
.NET Compact Framework
Supported in: 3.5
See Also