Thread.VolatileRead 方法

定义

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

重载

VolatileRead(SByte)
已过时.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

VolatileRead(Single)
已过时.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

VolatileRead(UInt64)
已过时.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

VolatileRead(UInt32)
已过时.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

VolatileRead(Object)
已过时.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

VolatileRead(UIntPtr)
已过时.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

VolatileRead(UInt16)
已过时.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

VolatileRead(Int64)
已过时.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

VolatileRead(IntPtr)
已过时.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

VolatileRead(Int16)
已过时.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

VolatileRead(Double)
已过时.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

VolatileRead(Byte)
已过时.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

VolatileRead(Int32)
已过时.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

VolatileRead(SByte)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

重要

此 API 不符合 CLS。

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

public:
 static System::SByte VolatileRead(System::SByte % address);
[System.CLSCompliant(false)]
public static sbyte VolatileRead (ref sbyte address);
[System.CLSCompliant(false)]
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static sbyte VolatileRead (ref sbyte address);
[<System.CLSCompliant(false)>]
static member VolatileRead : sbyte -> sbyte
[<System.CLSCompliant(false)>]
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileRead : sbyte -> sbyte
Public Shared Function VolatileRead (ByRef address As SByte) As SByte

参数

address
SByte

要读取的字段。

返回

读取的值。

属性

注解

Thread.VolatileReadThread.VolatileWrite 是旧 API,已被 和 Volatile.Write取代Volatile.Read。 有关更多信息,请参见 Volatile 类。

适用于

VolatileRead(Single)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

public:
 static float VolatileRead(float % address);
public static float VolatileRead (ref float address);
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static float VolatileRead (ref float address);
static member VolatileRead : single -> single
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileRead : single -> single
Public Shared Function VolatileRead (ByRef address As Single) As Single

参数

address
Single

要读取的字段。

返回

读取的值。

属性

注解

Thread.VolatileReadThread.VolatileWrite 是旧 API,已被 和 Volatile.Write取代Volatile.Read。 有关更多信息,请参见 Volatile 类。

适用于

VolatileRead(UInt64)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

重要

此 API 不符合 CLS。

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

public:
 static System::UInt64 VolatileRead(System::UInt64 % address);
[System.CLSCompliant(false)]
public static ulong VolatileRead (ref ulong address);
[System.CLSCompliant(false)]
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static ulong VolatileRead (ref ulong address);
[<System.CLSCompliant(false)>]
static member VolatileRead : uint64 -> uint64
[<System.CLSCompliant(false)>]
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileRead : uint64 -> uint64
Public Shared Function VolatileRead (ByRef address As ULong) As ULong

参数

address
UInt64

要读取的字段。

返回

读取的值。

属性

注解

Thread.VolatileReadThread.VolatileWrite 是旧 API,已被 和 Volatile.Write取代Volatile.Read。 有关更多信息,请参见 Volatile 类。

适用于

VolatileRead(UInt32)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

重要

此 API 不符合 CLS。

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

public:
 static System::UInt32 VolatileRead(System::UInt32 % address);
[System.CLSCompliant(false)]
public static uint VolatileRead (ref uint address);
[System.CLSCompliant(false)]
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static uint VolatileRead (ref uint address);
[<System.CLSCompliant(false)>]
static member VolatileRead : uint32 -> uint32
[<System.CLSCompliant(false)>]
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileRead : uint32 -> uint32
Public Shared Function VolatileRead (ByRef address As UInteger) As UInteger

参数

address
UInt32

要读取的字段。

返回

读取的值。

属性

注解

Thread.VolatileReadThread.VolatileWrite 是旧 API,已被 和 Volatile.Write取代Volatile.Read。 有关更多信息,请参见 Volatile 类。

适用于

VolatileRead(Object)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

public:
 static System::Object ^ VolatileRead(System::Object ^ % address);
public static object? VolatileRead (ref object? address);
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static object? VolatileRead (ref object? address);
public static object VolatileRead (ref object address);
static member VolatileRead : obj -> obj
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileRead : obj -> obj
Public Shared Function VolatileRead (ByRef address As Object) As Object

参数

address
Object

要读取的字段。

返回

读取的值。

属性

注解

Thread.VolatileReadThread.VolatileWrite 是旧 API,已被 和 Volatile.Write取代Volatile.Read。 有关更多信息,请参见 Volatile 类。

适用于

VolatileRead(UIntPtr)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

重要

此 API 不符合 CLS。

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

public:
 static UIntPtr VolatileRead(UIntPtr % address);
[System.CLSCompliant(false)]
public static UIntPtr VolatileRead (ref UIntPtr address);
[System.CLSCompliant(false)]
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static UIntPtr VolatileRead (ref UIntPtr address);
[<System.CLSCompliant(false)>]
static member VolatileRead : unativeint -> unativeint
[<System.CLSCompliant(false)>]
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileRead : unativeint -> unativeint
Public Shared Function VolatileRead (ByRef address As UIntPtr) As UIntPtr

参数

address
UIntPtr

unativeint

要读取的字段。

返回

UIntPtr

unativeint

读取的值。

属性

注解

Thread.VolatileReadThread.VolatileWrite 是旧 API,已被 和 Volatile.Write取代Volatile.Read。 有关更多信息,请参见 Volatile 类。

适用于

VolatileRead(UInt16)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

重要

此 API 不符合 CLS。

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

public:
 static System::UInt16 VolatileRead(System::UInt16 % address);
[System.CLSCompliant(false)]
public static ushort VolatileRead (ref ushort address);
[System.CLSCompliant(false)]
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static ushort VolatileRead (ref ushort address);
[<System.CLSCompliant(false)>]
static member VolatileRead : uint16 -> uint16
[<System.CLSCompliant(false)>]
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileRead : uint16 -> uint16
Public Shared Function VolatileRead (ByRef address As UShort) As UShort

参数

address
UInt16

要读取的字段。

返回

读取的值。

属性

注解

Thread.VolatileReadThread.VolatileWrite 是旧 API,已被 和 Volatile.Write取代Volatile.Read。 有关更多信息,请参见 Volatile 类。

适用于

VolatileRead(Int64)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

public:
 static long VolatileRead(long % address);
public static long VolatileRead (ref long address);
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static long VolatileRead (ref long address);
static member VolatileRead : int64 -> int64
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileRead : int64 -> int64
Public Shared Function VolatileRead (ByRef address As Long) As Long

参数

address
Int64

要读取的字段。

返回

读取的值。

属性

注解

Thread.VolatileReadThread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关更多信息,请参见 Volatile 类。

适用于

VolatileRead(IntPtr)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

public:
 static IntPtr VolatileRead(IntPtr % address);
public static IntPtr VolatileRead (ref IntPtr address);
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static IntPtr VolatileRead (ref IntPtr address);
static member VolatileRead : nativeint -> nativeint
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileRead : nativeint -> nativeint
Public Shared Function VolatileRead (ByRef address As IntPtr) As IntPtr

参数

address
IntPtr

nativeint

要读取的字段。

返回

IntPtr

nativeint

读取的值。

属性

注解

Thread.VolatileReadThread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关更多信息,请参见 Volatile 类。

适用于

VolatileRead(Int16)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

public:
 static short VolatileRead(short % address);
public static short VolatileRead (ref short address);
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static short VolatileRead (ref short address);
static member VolatileRead : int16 -> int16
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileRead : int16 -> int16
Public Shared Function VolatileRead (ByRef address As Short) As Short

参数

address
Int16

要读取的字段。

返回

读取的值。

属性

注解

Thread.VolatileReadThread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关更多信息,请参见 Volatile 类。

适用于

VolatileRead(Double)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

public:
 static double VolatileRead(double % address);
public static double VolatileRead (ref double address);
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static double VolatileRead (ref double address);
static member VolatileRead : double -> double
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileRead : double -> double
Public Shared Function VolatileRead (ByRef address As Double) As Double

参数

address
Double

要读取的字段。

返回

读取的值。

属性

注解

Thread.VolatileReadThread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关更多信息,请参见 Volatile 类。

适用于

VolatileRead(Byte)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

public:
 static System::Byte VolatileRead(System::Byte % address);
public static byte VolatileRead (ref byte address);
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static byte VolatileRead (ref byte address);
static member VolatileRead : byte -> byte
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileRead : byte -> byte
Public Shared Function VolatileRead (ByRef address As Byte) As Byte

参数

address
Byte

要读取的字段。

返回

读取的值。

属性

注解

Thread.VolatileReadThread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关更多信息,请参见 Volatile 类。

适用于

VolatileRead(Int32)

Source:
Thread.cs
Source:
Thread.cs
Source:
Thread.cs

注意

Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.

读取字段值。 在需要进行此操作的系统上,插入防止处理器重新对内存操作进行排序的内存屏障,如下所示:如果读取或写入操作在代码中出现在此方法之后,则处理器无法将其移至此方法之前。

public:
 static int VolatileRead(int % address);
public static int VolatileRead (ref int address);
[System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static int VolatileRead (ref int address);
static member VolatileRead : int -> int
[<System.Obsolete("Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.", DiagnosticId="SYSLIB0054", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member VolatileRead : int -> int
Public Shared Function VolatileRead (ByRef address As Integer) As Integer

参数

address
Int32

要读取的字段。

返回

读取的值。

属性

注解

Thread.VolatileReadThread.VolatileWrite 是旧 API,已替换为 Volatile.ReadVolatile.Write。 有关更多信息,请参见 Volatile 类。

适用于