Click or drag to resize

InterlockedCompareExchange(Object, Object, Object) Method

Compares two objects for reference equality and, if they are equal, replaces one of the objects

Namespace: Crestron.SimplSharp
Assembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntax
C#
public static Object CompareExchange(
	ref Object location1,
	Object value,
	Object comparand
)

Parameters

location1  Object
The destination object that is compared with comparand and possibly replaced.
value  Object
The object that replaces the destination object if the comparison results in equality.
comparand  Object
The object that is compared to the object at location1.

Return Value

Object
The original value in location1.
Exceptions
ExceptionCondition
ArgumentNullException location 1 is null

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also