SafeBuffer.ReadArray<T>(UInt64, T[], Int32, Int32) 方法

定義

重要

此 API 不符合 CLS 規範。

從記憶體中的位移開始讀取指定數目的實值型別,並從陣列中的索引處開始寫入。

public:
generic <typename T>
 where T : value class void ReadArray(System::UInt64 byteOffset, cli::array <T> ^ array, int index, int count);
[System.CLSCompliant(false)]
public void ReadArray<T> (ulong byteOffset, T[] array, int index, int count) where T : struct;
[<System.CLSCompliant(false)>]
member this.ReadArray : uint64 * 'T[] * int * int -> unit (requires 'T : struct)
Public Sub ReadArray(Of T As Structure) (byteOffset As ULong, array As T(), index As Integer, count As Integer)

類型參數

T

要讀取的實值型別。

參數

byteOffset
UInt64

要開始讀取的來源位置。

array
T[]

要寫入的輸出陣列。

index
Int32

在輸出陣列中開始寫入的位置。

count
Int32

從輸入陣列讀取並寫入輸出陣列的實值型別數目。

屬性

例外狀況

index 小於零。

-或-

count 小於零。

arraynull

陣列的長度減去索引會小於 count

尚未呼叫 Initialize 方法。

適用於

另請參閱