Hello everyone,

Suppose Status is an int variable, which could be read and write by multiple threads.

When assign the value (write) of Status variable, I always use,

Interlocked.Exchange(ref Status, SomeValue);
My question is, in order to make write/read of this variable thread safe, could I access (read) the variable directly by accessing Status variable, for example

Concole.write (Status);

if (Status > 0)
 // some ops

thanks in advance,