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

Definition

Writes structures from an array of type T into the accessor.

C#
public void WriteArray<T>(long position, T[] array, int offset, int count) where T : struct;
C#
[System.Security.SecurityCritical]
public void WriteArray<T>(long position, T[] array, int offset, int count) where T : struct;

Type Parameters

T

The type of structure.

Parameters

position
Int64

The number of bytes into the accessor at which to begin writing.

array
T[]

The array to write into the accessor.

offset
Int32

The index in array to start writing from.

count
Int32

The number of structures in array to write.

Attributes

Exceptions

There are not enough bytes in the accessor after position to write the number of structures specified by count.

position is less than zero or greater than the capacity of the accessor.

-or-

offset or count is less than zero.

array is null.

The accessor does not support writing.

The accessor has been disposed.

Applies to

Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1