InterlockedCompareExchangeT(T, T, T) Method |
Compares two instances of the specified reference type T for equality and,if they are equal, replaces one of them.
Namespace: Crestron.SimplSharpAssembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntaxpublic static T CompareExchange<T>(
ref T location1,
T value,
T comparand
)
where T : class
Parameters
- location1 T
- The destination, whose value is compared with comparand and possibly replaced.
- value T
- The value that replaces the destination value if the comparison results in
equality.
- comparand T
- The value that is compared to the value at location1.
Type Parameters
- T
- The type to be used for location1, value, and comparand. This type must be a reference type.
Return Value
TThe original value in location1.
ExceptionsVersion Information
.NET
Supported in: 6.0
.NET Compact Framework
Supported in: 3.5
See Also