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)

2007-10-22, 4713👍, 0💬