UnmanagedMemoryAccessor.ReadArray<T>(Int64, T[], Int32, Int32) メソッド

定義

アクセサーからT型の配列にT型の構造体を読み取ります。

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

型パラメーター

T

構造体の型。

パラメーター

position
Int64

読み取りを開始するアクセサー内のバイト数。

array
T[]

アクセサーから読み取られた構造体を格納する配列。

offset
Int32

コピーされた最初の構造体を配置する array 内のインデックス。

count
Int32

アクセサーから読み取る T 型の構造体の数。

返品

arrayに読み込まれる構造体の数。 この値は、使用可能な構造体が少ない場合は count より小さく、アクセサーの末尾に達した場合は 0 を指定できます。

属性

例外

arrayは、(count から始まる) 構造体のpositionを含むのに十分な大きさではありません。

arraynullです。

position が 0 より小さいか、アクセサーの容量より大きい。

アクセサーは読み取りをサポートしていません。

アクセサーが破棄されました。

注釈

このメソッドは安全ではありません。

適用対象