mscorlib 4.0.0.0 System.Object

On a multiprocessor system, a volatile write operation ensures that a value written to a memory location is immediately visible to all processors. A volatile read operation obtains the very latest value written to a memory location by any processor. These operations might require flushing processor caches, which can affect performance.

On a uniprocessor system, volatile reads and writes ensure that a value is read or written to memory and not cached (for example, in a processor register). Thus, you can use these operations to synchronize access to a field that can be updated by another thread or by hardware.

Volatile memory operations are for special cases of synchronization, where normal locking is not an acceptable alternative. Under normal circumstances, the C# lock statement, the Visual Basic SyncLock statement, and the class provide the easiest and least error-prone way of synchronizing access to data, and the class provides a simple way to write lazy initialization code without directly using double-checked locking.

The and methods enable functionality that is not supported in languages. For example:

Some languages, such as Visual Basic, do not recognize the concept of volatile memory operations. The class provides that functionality in such languages.

Calling one of these methods affects only a single memory access. To provide effective synchronization for a field, all access to the field must use and .

In C#, using the volatile modifier on a field guarantees that every access to that field uses the and methods, but the volatile modifier cannot be applied to array elements. The and methods can be used on array elements.

Contains methods for performing volatile memory operations.

- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Boolean `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Byte `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Double `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Int16 `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Int32 `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Int64 `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.IntPtr `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.SByte `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Single `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.UInt16 `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.UInt32 `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.UInt64 `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.UIntPtr `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  T ReferenceTypeConstraint `` To be added. To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Void ReferenceTypeConstraint `` `` To be added. To be added. To be added. To be added. To be added.