Compares two object variables for equality and stores a specified object if they are equal.
- location1
- A object reference that is set to value if the object to which it refers is equal to comparand.
- value
- The reference that will replace the value of location1 if location1 and comparand are equal.
- comparand
- An object to be compared to that referred to by location1.
A object containing the original value of location1.
Type Reason ArgumentNullException The address of location1 is null .
The compare and store operations are performed as an atomic operation.
Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0