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

定义

重要

此 API 不符合 CLS。

从自偏移量开始的内存中读取指定数量的值类型,并将它们写入从索引开始的数组中。Reads the specified number of value types from memory starting at the offset, and writes them into an array starting at the index.

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

要读取的值类型。The value type to read.

参数

byteOffset
UInt64

从其开始读取的位置。The location from which to start reading.

array
T[]

要写入的输出数组。The output array to write to.

index
Int32

输出数组中要开始写入的位置。The location in the output array to begin writing to.

count
Int32

要从输入数组中读取并写入输出数组的值类型的数目。The number of value types to read from the input array and to write to the output array.

属性

例外

index 小于零。index is less than zero.

-or- count 小于零。count is less than zero.

arraynullarray is null.

数组的长度减去索引小于 countThe length of the array minus the index is less than count.

未调用 Initialize 方法。The Initialize method has not been called.

适用于

另请参阅