What is use of interlocked class?

Q

What is use of interlocked class?

✍: Guest

A

Interlocked class provides methods by which you can achieve following functionalities :-

* Increment Values.
* Decrement values.
* Exchange values between variables.
* Compare values from any thread.
in a synchronization mode.

Example :- System.Threading.Interlocked.Increment(IntA)

2009-03-06, 4477👍, 0💬