共用方式為


Thread.VolatileWrite 方法

定義

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

多載

VolatileWrite(UIntPtr, UIntPtr)
已淘汰.

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

VolatileWrite(UInt64, UInt64)
已淘汰.

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

VolatileWrite(UInt32, UInt32)
已淘汰.

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

VolatileWrite(UInt16, UInt16)
已淘汰.

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

VolatileWrite(Single, Single)
已淘汰.

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

VolatileWrite(SByte, SByte)
已淘汰.

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

VolatileWrite(Object, Object)
已淘汰.

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

VolatileWrite(IntPtr, IntPtr)
已淘汰.

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

VolatileWrite(Int16, Int16)
已淘汰.

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

VolatileWrite(Int32, Int32)
已淘汰.

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

VolatileWrite(Double, Double)
已淘汰.

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

VolatileWrite(Byte, Byte)
已淘汰.

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

VolatileWrite(Int64, Int64)
已淘汰.

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

VolatileWrite(UIntPtr, UIntPtr)

來源:
Thread.cs
來源:
Thread.cs
來源:
Thread.cs

警告

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

重要

此 API 不符合 CLS 規範。

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

public:
 static void VolatileWrite(UIntPtr % address, UIntPtr value);
[System.CLSCompliant(false)]
public static void VolatileWrite (ref UIntPtr address, UIntPtr value);
[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 void VolatileWrite (ref UIntPtr address, UIntPtr value);
[<System.CLSCompliant(false)>]
static member VolatileWrite : unativeint * unativeint -> unit
[<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 VolatileWrite : unativeint * unativeint -> unit
Public Shared Sub VolatileWrite (ByRef address As UIntPtr, value As UIntPtr)

參數

address
UIntPtr

unativeint

要寫入值的欄位。

value
UIntPtr

unativeint

要寫入的值。

屬性

備註

Thread.VolatileReadThread.VolatileWrite 是舊版 API,且 已由 Volatile.ReadVolatile.Write取代。 如需詳細資訊,請參閱 Volatile 類別。

適用於

VolatileWrite(UInt64, UInt64)

來源:
Thread.cs
來源:
Thread.cs
來源:
Thread.cs

警告

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

重要

此 API 不符合 CLS 規範。

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

public:
 static void VolatileWrite(System::UInt64 % address, System::UInt64 value);
[System.CLSCompliant(false)]
public static void VolatileWrite (ref ulong address, ulong value);
[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 void VolatileWrite (ref ulong address, ulong value);
[<System.CLSCompliant(false)>]
static member VolatileWrite : uint64 * uint64 -> unit
[<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 VolatileWrite : uint64 * uint64 -> unit
Public Shared Sub VolatileWrite (ByRef address As ULong, value As ULong)

參數

address
UInt64

要寫入值的欄位。

value
UInt64

要寫入的值。

屬性

備註

Thread.VolatileReadThread.VolatileWrite 是舊版 API,且 已由 Volatile.ReadVolatile.Write取代。 如需詳細資訊,請參閱 Volatile 類別。

適用於

VolatileWrite(UInt32, UInt32)

來源:
Thread.cs
來源:
Thread.cs
來源:
Thread.cs

警告

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

重要

此 API 不符合 CLS 規範。

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

public:
 static void VolatileWrite(System::UInt32 % address, System::UInt32 value);
[System.CLSCompliant(false)]
public static void VolatileWrite (ref uint address, uint value);
[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 void VolatileWrite (ref uint address, uint value);
[<System.CLSCompliant(false)>]
static member VolatileWrite : uint32 * uint32 -> unit
[<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 VolatileWrite : uint32 * uint32 -> unit
Public Shared Sub VolatileWrite (ByRef address As UInteger, value As UInteger)

參數

address
UInt32

要寫入值的欄位。

value
UInt32

要寫入的值。

屬性

備註

Thread.VolatileReadThread.VolatileWrite 是舊版 API,且 已由 Volatile.ReadVolatile.Write取代。 如需詳細資訊,請參閱 Volatile 類別。

適用於

VolatileWrite(UInt16, UInt16)

來源:
Thread.cs
來源:
Thread.cs
來源:
Thread.cs

警告

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

重要

此 API 不符合 CLS 規範。

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

public:
 static void VolatileWrite(System::UInt16 % address, System::UInt16 value);
[System.CLSCompliant(false)]
public static void VolatileWrite (ref ushort address, ushort value);
[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 void VolatileWrite (ref ushort address, ushort value);
[<System.CLSCompliant(false)>]
static member VolatileWrite : uint16 * uint16 -> unit
[<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 VolatileWrite : uint16 * uint16 -> unit
Public Shared Sub VolatileWrite (ByRef address As UShort, value As UShort)

參數

address
UInt16

要寫入值的欄位。

value
UInt16

要寫入的值。

屬性

備註

Thread.VolatileReadThread.VolatileWrite 是舊版 API,且 已由 Volatile.ReadVolatile.Write取代。 如需詳細資訊,請參閱 Volatile 類別。

適用於

VolatileWrite(Single, Single)

來源:
Thread.cs
來源:
Thread.cs
來源:
Thread.cs

警告

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

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

public:
 static void VolatileWrite(float % address, float value);
public static void VolatileWrite (ref float address, float value);
[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 void VolatileWrite (ref float address, float value);
static member VolatileWrite : single * single -> unit
[<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 VolatileWrite : single * single -> unit
Public Shared Sub VolatileWrite (ByRef address As Single, value As Single)

參數

address
Single

要寫入值的欄位。

value
Single

要寫入的值。

屬性

備註

Thread.VolatileReadThread.VolatileWrite 是舊版 API,且 已由 Volatile.ReadVolatile.Write取代。 如需詳細資訊,請參閱 Volatile 類別。

適用於

VolatileWrite(SByte, SByte)

來源:
Thread.cs
來源:
Thread.cs
來源:
Thread.cs

警告

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

重要

此 API 不符合 CLS 規範。

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

public:
 static void VolatileWrite(System::SByte % address, System::SByte value);
[System.CLSCompliant(false)]
public static void VolatileWrite (ref sbyte address, sbyte value);
[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 void VolatileWrite (ref sbyte address, sbyte value);
[<System.CLSCompliant(false)>]
static member VolatileWrite : sbyte * sbyte -> unit
[<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 VolatileWrite : sbyte * sbyte -> unit
Public Shared Sub VolatileWrite (ByRef address As SByte, value As SByte)

參數

address
SByte

要寫入值的欄位。

value
SByte

要寫入的值。

屬性

備註

Thread.VolatileReadThread.VolatileWrite 是舊版 API,且 已由 Volatile.ReadVolatile.Write取代。 如需詳細資訊,請參閱 Volatile 類別。

適用於

VolatileWrite(Object, Object)

來源:
Thread.cs
來源:
Thread.cs
來源:
Thread.cs

警告

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

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

public:
 static void VolatileWrite(System::Object ^ % address, System::Object ^ value);
public static void VolatileWrite (ref object? address, object? value);
[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 void VolatileWrite (ref object? address, object? value);
public static void VolatileWrite (ref object address, object value);
static member VolatileWrite : obj * obj -> unit
[<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 VolatileWrite : obj * obj -> unit
Public Shared Sub VolatileWrite (ByRef address As Object, value As Object)

參數

address
Object

要寫入值的欄位。

value
Object

要寫入的值。

屬性

備註

Thread.VolatileReadThread.VolatileWrite 是舊版 API,且 已由 Volatile.ReadVolatile.Write取代。 如需詳細資訊,請參閱 Volatile 類別。

適用於

VolatileWrite(IntPtr, IntPtr)

來源:
Thread.cs
來源:
Thread.cs
來源:
Thread.cs

警告

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

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

public:
 static void VolatileWrite(IntPtr % address, IntPtr value);
public static void VolatileWrite (ref IntPtr address, IntPtr value);
[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 void VolatileWrite (ref IntPtr address, IntPtr value);
static member VolatileWrite : nativeint * nativeint -> unit
[<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 VolatileWrite : nativeint * nativeint -> unit
Public Shared Sub VolatileWrite (ByRef address As IntPtr, value As IntPtr)

參數

address
IntPtr

nativeint

要寫入值的欄位。

value
IntPtr

nativeint

要寫入的值。

屬性

備註

Thread.VolatileReadThread.VolatileWrite 是舊版 API,且 已由 Volatile.ReadVolatile.Write取代。 如需詳細資訊,請參閱 Volatile 類別。

適用於

VolatileWrite(Int16, Int16)

來源:
Thread.cs
來源:
Thread.cs
來源:
Thread.cs

警告

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

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

public:
 static void VolatileWrite(short % address, short value);
public static void VolatileWrite (ref short address, short value);
[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 void VolatileWrite (ref short address, short value);
static member VolatileWrite : int16 * int16 -> unit
[<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 VolatileWrite : int16 * int16 -> unit
Public Shared Sub VolatileWrite (ByRef address As Short, value As Short)

參數

address
Int16

要寫入值的欄位。

value
Int16

要寫入的值。

屬性

備註

Thread.VolatileReadThread.VolatileWrite 是舊版 API,且 已由 Volatile.ReadVolatile.Write取代。 如需詳細資訊,請參閱 Volatile 類別。

適用於

VolatileWrite(Int32, Int32)

來源:
Thread.cs
來源:
Thread.cs
來源:
Thread.cs

警告

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

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

public:
 static void VolatileWrite(int % address, int value);
public static void VolatileWrite (ref int address, int value);
[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 void VolatileWrite (ref int address, int value);
static member VolatileWrite : int * int -> unit
[<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 VolatileWrite : int * int -> unit
Public Shared Sub VolatileWrite (ByRef address As Integer, value As Integer)

參數

address
Int32

要寫入值的欄位。

value
Int32

要寫入的值。

屬性

備註

Thread.VolatileReadThread.VolatileWrite 是舊版 API,且 已由 Volatile.ReadVolatile.Write取代。 如需詳細資訊,請參閱 Volatile 類別。

適用於

VolatileWrite(Double, Double)

來源:
Thread.cs
來源:
Thread.cs
來源:
Thread.cs

警告

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

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

public:
 static void VolatileWrite(double % address, double value);
public static void VolatileWrite (ref double address, double value);
[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 void VolatileWrite (ref double address, double value);
static member VolatileWrite : double * double -> unit
[<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 VolatileWrite : double * double -> unit
Public Shared Sub VolatileWrite (ByRef address As Double, value As Double)

參數

address
Double

要寫入值的欄位。

value
Double

要寫入的值。

屬性

備註

Thread.VolatileReadThread.VolatileWrite 是舊版 API,且 已由 Volatile.ReadVolatile.Write取代。 如需詳細資訊,請參閱 Volatile 類別。

適用於

VolatileWrite(Byte, Byte)

來源:
Thread.cs
來源:
Thread.cs
來源:
Thread.cs

警告

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

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

public:
 static void VolatileWrite(System::Byte % address, System::Byte value);
public static void VolatileWrite (ref byte address, byte value);
[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 void VolatileWrite (ref byte address, byte value);
static member VolatileWrite : byte * byte -> unit
[<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 VolatileWrite : byte * byte -> unit
Public Shared Sub VolatileWrite (ByRef address As Byte, value As Byte)

參數

address
Byte

要寫入值的欄位。

value
Byte

要寫入的值。

屬性

備註

Thread.VolatileReadThread.VolatileWrite 是舊版 API,且 已由 Volatile.ReadVolatile.Write取代。 如需詳細資訊,請參閱 Volatile 類別。

適用於

VolatileWrite(Int64, Int64)

來源:
Thread.cs
來源:
Thread.cs
來源:
Thread.cs

警告

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

將值寫入欄位中。 在需要它的系統上,以如下方式插入可防止處理器重新排序記憶體作業的記憶體屏障:如果程式碼中這個方法之前出現讀取或寫入,處理器便無法在這個方法之後移動它。

public:
 static void VolatileWrite(long % address, long value);
public static void VolatileWrite (ref long address, long value);
[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 void VolatileWrite (ref long address, long value);
static member VolatileWrite : int64 * int64 -> unit
[<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 VolatileWrite : int64 * int64 -> unit
Public Shared Sub VolatileWrite (ByRef address As Long, value As Long)

參數

address
Int64

要寫入值的欄位。

value
Int64

要寫入的值。

屬性

備註

Thread.VolatileReadThread.VolatileWrite 是舊版 API,且 已由 Volatile.ReadVolatile.Write取代。 如需詳細資訊,請參閱 Volatile 類別。

適用於