Thread.VolatileRead Method

Definition

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

Overloads

VolatileRead(SByte)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

VolatileRead(Single)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

VolatileRead(UInt64)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

VolatileRead(UInt32)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

VolatileRead(Object)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

VolatileRead(UIntPtr)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

VolatileRead(UInt16)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

VolatileRead(Int64)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

VolatileRead(IntPtr)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

VolatileRead(Int16)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

VolatileRead(Double)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

VolatileRead(Byte)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

VolatileRead(Int32)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

VolatileRead(SByte)

Important

This API is not CLS-compliant.

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

public:
 static System::SByte VolatileRead(System::SByte % address);
[System.CLSCompliant(false)]
public static sbyte VolatileRead (ref sbyte address);
[<System.CLSCompliant(false)>]
static member VolatileRead : sbyte -> sbyte
Public Shared Function VolatileRead (ByRef address As SByte) As SByte

Parameters

address
SByte

The field to be read.

Returns

SByte

The value that was read.

Attributes

Remarks

Thread.VolatileRead and Thread.VolatileWrite are legacy APIs and have been replaced by Volatile.Read and Volatile.Write. See the Volatile class for more information.

Applies to

VolatileRead(Single)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

public:
 static float VolatileRead(float % address);
public static float VolatileRead (ref float address);
static member VolatileRead : single -> single
Public Shared Function VolatileRead (ByRef address As Single) As Single

Parameters

address
Single

The field to be read.

Returns

Single

The value that was read.

Remarks

Thread.VolatileRead and Thread.VolatileWrite are legacy APIs and have been replaced by Volatile.Read and Volatile.Write. See the Volatile class for more information.

Applies to

VolatileRead(UInt64)

Important

This API is not CLS-compliant.

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

public:
 static System::UInt64 VolatileRead(System::UInt64 % address);
[System.CLSCompliant(false)]
public static ulong VolatileRead (ref ulong address);
[<System.CLSCompliant(false)>]
static member VolatileRead : uint64 -> uint64
Public Shared Function VolatileRead (ByRef address As ULong) As ULong

Parameters

address
UInt64

The field to be read.

Returns

UInt64

The value that was read.

Attributes

Remarks

Thread.VolatileRead and Thread.VolatileWrite are legacy APIs and have been replaced by Volatile.Read and Volatile.Write. See the Volatile class for more information.

Applies to

VolatileRead(UInt32)

Important

This API is not CLS-compliant.

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

public:
 static System::UInt32 VolatileRead(System::UInt32 % address);
[System.CLSCompliant(false)]
public static uint VolatileRead (ref uint address);
[<System.CLSCompliant(false)>]
static member VolatileRead : uint32 -> uint32
Public Shared Function VolatileRead (ByRef address As UInteger) As UInteger

Parameters

address
UInt32

The field to be read.

Returns

UInt32

The value that was read.

Attributes

Remarks

Thread.VolatileRead and Thread.VolatileWrite are legacy APIs and have been replaced by Volatile.Read and Volatile.Write. See the Volatile class for more information.

Applies to

VolatileRead(Object)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

public:
 static System::Object ^ VolatileRead(System::Object ^ % address);
public static object? VolatileRead (ref object? address);
public static object VolatileRead (ref object address);
static member VolatileRead : obj -> obj
Public Shared Function VolatileRead (ByRef address As Object) As Object

Parameters

address
Object

The field to be read.

Returns

Object

The value that was read.

Remarks

Thread.VolatileRead and Thread.VolatileWrite are legacy APIs and have been replaced by Volatile.Read and Volatile.Write. See the Volatile class for more information.

Applies to

VolatileRead(UIntPtr)

Important

This API is not CLS-compliant.

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

public:
 static UIntPtr VolatileRead(UIntPtr % address);
[System.CLSCompliant(false)]
public static UIntPtr VolatileRead (ref UIntPtr address);
[<System.CLSCompliant(false)>]
static member VolatileRead : unativeint -> unativeint
Public Shared Function VolatileRead (ByRef address As UIntPtr) As UIntPtr

Parameters

address
UIntPtr

The field to be read.

Returns

UIntPtr

The value that was read.

Attributes

Remarks

Thread.VolatileRead and Thread.VolatileWrite are legacy APIs and have been replaced by Volatile.Read and Volatile.Write. See the Volatile class for more information.

Applies to

VolatileRead(UInt16)

Important

This API is not CLS-compliant.

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

public:
 static System::UInt16 VolatileRead(System::UInt16 % address);
[System.CLSCompliant(false)]
public static ushort VolatileRead (ref ushort address);
[<System.CLSCompliant(false)>]
static member VolatileRead : uint16 -> uint16
Public Shared Function VolatileRead (ByRef address As UShort) As UShort

Parameters

address
UInt16

The field to be read.

Returns

UInt16

The value that was read.

Attributes

Remarks

Thread.VolatileRead and Thread.VolatileWrite are legacy APIs and have been replaced by Volatile.Read and Volatile.Write. See the Volatile class for more information.

Applies to

VolatileRead(Int64)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

public:
 static long VolatileRead(long % address);
public static long VolatileRead (ref long address);
static member VolatileRead : int64 -> int64
Public Shared Function VolatileRead (ByRef address As Long) As Long

Parameters

address
Int64

The field to be read.

Returns

Int64

The value that was read.

Remarks

Thread.VolatileRead and Thread.VolatileWrite are legacy APIs and have been replaced by Volatile.Read and Volatile.Write. See the Volatile class for more information.

Applies to

VolatileRead(IntPtr)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

public:
 static IntPtr VolatileRead(IntPtr % address);
public static IntPtr VolatileRead (ref IntPtr address);
static member VolatileRead : nativeint -> nativeint
Public Shared Function VolatileRead (ByRef address As IntPtr) As IntPtr

Parameters

address
IntPtr

The field to be read.

Returns

IntPtr

The value that was read.

Remarks

Thread.VolatileRead and Thread.VolatileWrite are legacy APIs and have been replaced by Volatile.Read and Volatile.Write. See the Volatile class for more information.

Applies to

VolatileRead(Int16)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

public:
 static short VolatileRead(short % address);
public static short VolatileRead (ref short address);
static member VolatileRead : int16 -> int16
Public Shared Function VolatileRead (ByRef address As Short) As Short

Parameters

address
Int16

The field to be read.

Returns

Int16

The value that was read.

Remarks

Thread.VolatileRead and Thread.VolatileWrite are legacy APIs and have been replaced by Volatile.Read and Volatile.Write. See the Volatile class for more information.

Applies to

VolatileRead(Double)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

public:
 static double VolatileRead(double % address);
public static double VolatileRead (ref double address);
static member VolatileRead : double -> double
Public Shared Function VolatileRead (ByRef address As Double) As Double

Parameters

address
Double

The field to be read.

Returns

Double

The value that was read.

Remarks

Thread.VolatileRead and Thread.VolatileWrite are legacy APIs and have been replaced by Volatile.Read and Volatile.Write. See the Volatile class for more information.

Applies to

VolatileRead(Byte)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

public:
 static System::Byte VolatileRead(System::Byte % address);
public static byte VolatileRead (ref byte address);
static member VolatileRead : byte -> byte
Public Shared Function VolatileRead (ByRef address As Byte) As Byte

Parameters

address
Byte

The field to be read.

Returns

Byte

The value that was read.

Remarks

Thread.VolatileRead and Thread.VolatileWrite are legacy APIs and have been replaced by Volatile.Read and Volatile.Write. See the Volatile class for more information.

Applies to

VolatileRead(Int32)

Reads the value of a field. On systems that require it, inserts a memory barrier that prevents the processor from reordering memory operations as follows: If a read or write appears after this method in the code, the processor cannot move it before this method.

public:
 static int VolatileRead(int % address);
public static int VolatileRead (ref int address);
static member VolatileRead : int -> int
Public Shared Function VolatileRead (ByRef address As Integer) As Integer

Parameters

address
Int32

The field to be read.

Returns

Int32

The value that was read.

Remarks

Thread.VolatileRead and Thread.VolatileWrite are legacy APIs and have been replaced by Volatile.Read and Volatile.Write. See the Volatile class for more information.

Applies to