0
kicks
C#/.NET Little Wonders: Interlocked Increment(), Decrement(), and Add(
Often times, we need to update a count in a multi-threaded program. This may be an incrementing, decrementing, or adding a value in a thread-safe manner.
This post will discuss one of the lightest ways to do this: the Interlocked class.