UnmanagedMemoryAccessor.WriteArray<T>(Int64, T[], Int32, Int32) 方法

定義

將結構從型別 T 的陣列寫入至存取子。

public:
generic <typename T>
 where T : value class void WriteArray(long position, cli::array <T> ^ array, int offset, int count);
public void WriteArray<T> (long position, T[] array, int offset, int count) where T : struct;
[System.Security.SecurityCritical]
public void WriteArray<T> (long position, T[] array, int offset, int count) where T : struct;
member this.WriteArray : int64 * 'T[] * int * int -> unit (requires 'T : struct)
[<System.Security.SecurityCritical>]
member this.WriteArray : int64 * 'T[] * int * int -> unit (requires 'T : struct)
Public Sub WriteArray(Of T As Structure) (position As Long, array As T(), offset As Integer, count As Integer)

類型參數

T

結構的型別。

參數

position
Int64

會在此處開始寫入存取子的位元組數。

array
T[]

要寫入至存取子的陣列。

offset
Int32

array 中要開始寫入的索引。

count
Int32

array 中要寫入的結構數目。

屬性

例外狀況

position 之後,存取子中沒有足夠的位元組可以寫入由 count 所指定的結構數目。

position 小於零或大於這個存取子的容量。

-或-

offsetcount 小於零。

arraynull

存取子不支援寫入。

存取子已經被處置。

適用於