End Google Ads 201810 - BS.net 01 --> Hi all
I want to use volatile var in my multithreaded program.
Reading Writing operations are guaranteed to be thread safe.
What about comparing against other values?
Do you know if it is thread safe doing something like

static volatile long myValue = 10;
if( myValue == 30 ) // is this thread safe?
{
// ..do this
}

or if it is better to use Interlocked class approach?
Thanks in advance
CS