Thread.VolatileRead Method (Byte)
Reads the value of a field. The value is the latest written by any processor in a computer, regardless of the number of processors or the state of processor cache.
Assembly: mscorlib (in mscorlib.dll)
On a multiprocessor system,obtains the very latest value written to a memory location by any processor. This might require flushing processor caches.
Even on a uniprocessor system, VolatileWrite ensure that a value is read or written to memory, and not cached (for example, in a processor register). Thus, you can use them to synchronize access to a field that can be updated by another thread, or by hardware.and
Calling this method affects only a single memory access. To provide effective synchronization for a field, all access to the field must use VolatileWrite.or
In C#, using the volatile modifier on a field guarantees that all access to that field uses VolatileWrite.or
Available since 1.1