SafeBuffer.WriteArray<T> Method (UInt64, T[], Int32, Int32)

.NET Framework (current version)
 

Writes the specified number of value types to a memory location by reading bytes starting from the specified location in the input array.

This API is not CLS-compliant.

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

[CLSCompliantAttribute(false)]
public void WriteArray<T>(
	ulong byteOffset,
	T[] array,
	int index,
	int count
)
where T : struct

Parameters

byteOffset
Type: System.UInt64

The location in memory to write to.

array
Type: T[]

The input array.

index
Type: System.Int32

The offset in the array to start reading from.

count
Type: System.Int32

The number of value types to write.

Type Parameters

T

The value type to write.

Exception Condition
ArgumentNullException

array is null.

ArgumentOutOfRangeException

index or count is less than zero.

ArgumentException

The length of the input array minus index is less than count.

InvalidOperationException

The Initialize method has not been called.

Each element in the input array consists of the generic value type of the class.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
Show: