Volatile.Read Método

Definição

Lê o valor de um campo.Reads the value of a field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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.

Sobrecargas

Read(Boolean)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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.

Read(Byte)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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.

Read(Double)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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.

Read(Int16)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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.

Read(Int32)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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.

Read(Int64)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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.

Read(IntPtr)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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.

Read(SByte)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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.

Read(Single)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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.

Read(UInt16)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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.

Read(UInt32)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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.

Read(UInt64)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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.

Read(UIntPtr)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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.

Read<T>(T)

Lê a referência de objeto do campo especificado.Reads the object reference from the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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.

Read(Boolean)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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 bool Read(bool % location);
public static bool Read (ref bool location);
static member Read : bool -> bool
Public Shared Function Read (ByRef location As Boolean) As Boolean

Parâmetros

location
Boolean

O campo a ser lido.The field to read.

Retornos

Boolean

O valor que foi lido.The value that was read. Este valor é o último gravado por qualquer processador no computador, independentemente do número de processadores ou do estado do cache do processador.This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Comentários

Para obter mais informações, consulte a classe Volatile.For more information, see the Volatile class.

Aplica-se a

Read(Byte)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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 Read(System::Byte % location);
public static byte Read (ref byte location);
static member Read : byte -> byte
Public Shared Function Read (ByRef location As Byte) As Byte

Parâmetros

location
Byte

O campo a ser lido.The field to read.

Retornos

Byte

O valor que foi lido.The value that was read. Este valor é o último gravado por qualquer processador no computador, independentemente do número de processadores ou do estado do cache do processador.This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Comentários

Para obter mais informações, consulte a classe Volatile.For more information, see the Volatile class.

Aplica-se a

Read(Double)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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 Read(double % location);
public static double Read (ref double location);
static member Read : double -> double
Public Shared Function Read (ByRef location As Double) As Double

Parâmetros

location
Double

O campo a ser lido.The field to read.

Retornos

Double

O valor que foi lido.The value that was read. Este valor é o último gravado por qualquer processador no computador, independentemente do número de processadores ou do estado do cache do processador.This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Comentários

Para obter mais informações, consulte a classe Volatile.For more information, see the Volatile class.

Aplica-se a

Read(Int16)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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 Read(short % location);
public static short Read (ref short location);
static member Read : int16 -> int16
Public Shared Function Read (ByRef location As Short) As Short

Parâmetros

location
Int16

O campo a ser lido.The field to read.

Retornos

Int16

O valor que foi lido.The value that was read. Este valor é o último gravado por qualquer processador no computador, independentemente do número de processadores ou do estado do cache do processador.This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Comentários

Para obter mais informações, consulte a classe Volatile.For more information, see the Volatile class.

Aplica-se a

Read(Int32)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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 Read(int % location);
public static int Read (ref int location);
static member Read : int -> int
Public Shared Function Read (ByRef location As Integer) As Integer

Parâmetros

location
Int32

O campo a ser lido.The field to read.

Retornos

Int32

O valor que foi lido.The value that was read. Este valor é o último gravado por qualquer processador no computador, independentemente do número de processadores ou do estado do cache do processador.This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Comentários

Para obter mais informações, consulte a classe Volatile.For more information, see the Volatile class.

Aplica-se a

Read(Int64)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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 Read(long % location);
public static long Read (ref long location);
static member Read : int64 -> int64
Public Shared Function Read (ByRef location As Long) As Long

Parâmetros

location
Int64

O campo a ser lido.The field to read.

Retornos

Int64

O valor que foi lido.The value that was read. Este valor é o último gravado por qualquer processador no computador, independentemente do número de processadores ou do estado do cache do processador.This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Comentários

Para obter mais informações, consulte a classe Volatile.For more information, see the Volatile class.

Aplica-se a

Read(IntPtr)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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 Read(IntPtr % location);
public static IntPtr Read (ref IntPtr location);
static member Read : nativeint -> nativeint
Public Shared Function Read (ByRef location As IntPtr) As IntPtr

Parâmetros

location
IntPtr

O campo a ser lido.The field to read.

Retornos

IntPtr

O valor que foi lido.The value that was read. Este valor é o último gravado por qualquer processador no computador, independentemente do número de processadores ou do estado do cache do processador.This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Comentários

Para obter mais informações, consulte a classe Volatile.For more information, see the Volatile class.

Aplica-se a

Read(SByte)

Importante

Esta API não está em conformidade com CLS.

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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 Read(System::SByte % location);
[System.CLSCompliant(false)]
public static sbyte Read (ref sbyte location);
[<System.CLSCompliant(false)>]
static member Read : sbyte -> sbyte
Public Shared Function Read (ByRef location As SByte) As SByte

Parâmetros

location
SByte

O campo a ser lido.The field to read.

Retornos

SByte

O valor que foi lido.The value that was read. Este valor é o último gravado por qualquer processador no computador, independentemente do número de processadores ou do estado do cache do processador.This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Atributos

Comentários

Para obter mais informações, consulte a classe Volatile.For more information, see the Volatile class.

Aplica-se a

Read(Single)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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 Read(float % location);
public static float Read (ref float location);
static member Read : single -> single
Public Shared Function Read (ByRef location As Single) As Single

Parâmetros

location
Single

O campo a ser lido.The field to read.

Retornos

Single

O valor que foi lido.The value that was read. Este valor é o último gravado por qualquer processador no computador, independentemente do número de processadores ou do estado do cache do processador.This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Comentários

Para obter mais informações, consulte a classe Volatile.For more information, see the Volatile class.

Aplica-se a

Read(UInt16)

Importante

Esta API não está em conformidade com CLS.

Alternativa em conformidade com CLS
System.Threading.Volatile.Read(Int16)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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 Read(System::UInt16 % location);
[System.CLSCompliant(false)]
public static ushort Read (ref ushort location);
[<System.CLSCompliant(false)>]
static member Read : uint16 -> uint16
Public Shared Function Read (ByRef location As UShort) As UShort

Parâmetros

location
UInt16

O campo a ser lido.The field to read.

Retornos

UInt16

O valor que foi lido.The value that was read. Este valor é o último gravado por qualquer processador no computador, independentemente do número de processadores ou do estado do cache do processador.This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Atributos

Comentários

Para obter mais informações, consulte a classe Volatile.For more information, see the Volatile class.

Aplica-se a

Read(UInt32)

Importante

Esta API não está em conformidade com CLS.

Alternativa em conformidade com CLS
System.Threading.Volatile.Read(Int32)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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 Read(System::UInt32 % location);
[System.CLSCompliant(false)]
public static uint Read (ref uint location);
[<System.CLSCompliant(false)>]
static member Read : uint32 -> uint32
Public Shared Function Read (ByRef location As UInteger) As UInteger

Parâmetros

location
UInt32

O campo a ser lido.The field to read.

Retornos

UInt32

O valor que foi lido.The value that was read. Este valor é o último gravado por qualquer processador no computador, independentemente do número de processadores ou do estado do cache do processador.This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Atributos

Comentários

Para obter mais informações, consulte a classe Volatile.For more information, see the Volatile class.

Aplica-se a

Read(UInt64)

Importante

Esta API não está em conformidade com CLS.

Alternativa em conformidade com CLS
System.Threading.Volatile.Read(Int64)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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 Read(System::UInt64 % location);
[System.CLSCompliant(false)]
public static ulong Read (ref ulong location);
[<System.CLSCompliant(false)>]
static member Read : uint64 -> uint64
Public Shared Function Read (ByRef location As ULong) As ULong

Parâmetros

location
UInt64

O campo a ser lido.The field to read.

Retornos

UInt64

O valor que foi lido.The value that was read. Este valor é o último gravado por qualquer processador no computador, independentemente do número de processadores ou do estado do cache do processador.This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Atributos

Comentários

Para obter mais informações, consulte a classe Volatile.For more information, see the Volatile class.

Aplica-se a

Read(UIntPtr)

Importante

Esta API não está em conformidade com CLS.

Alternativa em conformidade com CLS
System.Threading.Volatile.Read(IntPtr)

Lê o valor do campo especificado.Reads the value of the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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 Read(UIntPtr % location);
[System.CLSCompliant(false)]
public static UIntPtr Read (ref UIntPtr location);
[<System.CLSCompliant(false)>]
static member Read : unativeint -> unativeint
Public Shared Function Read (ByRef location As UIntPtr) As UIntPtr

Parâmetros

location
UIntPtr

O campo a ser lido.The field to read.

Retornos

UIntPtr

O valor que foi lido.The value that was read. Este valor é o último gravado por qualquer processador no computador, independentemente do número de processadores ou do estado do cache do processador.This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Atributos

Comentários

Para obter mais informações, consulte a classe Volatile.For more information, see the Volatile class.

Aplica-se a

Read<T>(T)

Lê a referência de objeto do campo especificado.Reads the object reference from the specified field. Em sistemas que precisam dele, insere uma barreira de memória que impede que o processador reordene as operações de memória da seguinte maneira: se uma leitura ou gravação aparecer após esse método no código, o processador não poderá movê-la para antes desse método.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:
generic <typename T>
 where T : class static T Read(T % location);
public static T Read<T> (ref T location) where T : class;
static member Read : 'T -> 'T (requires 'T : null)
Public Shared Function Read(Of T As Class) (ByRef location As T) As T

Parâmetros de tipo

T

O tipo do campo a ser lido.The type of field to read. Este deve ser um tipo de referência, não um tipo de valor.This must be a reference type, not a value type.

Parâmetros

location
T

O campo a ser lido.The field to read.

Retornos

T

A referência a T que foi lida.The reference to T that was read. A referência é o último gravado por qualquer processador em um computador, independentemente do número de processadores ou do estado do cache do processador.This reference is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Comentários

Para obter mais informações, consulte a classe Volatile.For more information, see the Volatile class.

Aplica-se a