Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SafeBuffer::WriteArray<T> Method (UInt64, array<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)

public:
generic<typename T>
where T : value struct, gcnew()
[CLSCompliantAttribute(false)]
void WriteArray(
	unsigned long long byteOffset,
	array<T>^ array,
	int index,
	int count
)

Parameters

byteOffset
Type: System::UInt64

The location in memory to write to.

array
Type: array<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:
© 2017 Microsoft