[]
        
(Showing Draft Content)

C1.Util.DX.DataStream.WriteRange

WriteRange Method

WriteRange<T>(T[])

Writes an array of values to the current stream, and advances the current position within this stream by the number of bytes written.

Declaration
public void WriteRange<T>(T[] data) where T : struct
Parameters
Type Name Description
T[] data

An array of values to be written to the current stream.

Type Parameters
Name Description
T
Remarks

In order to provide faster read/write, this operation doesn't check stream bound. A client must carefully not read/write above the size of this datastream.

Exceptions
Type Condition
NotSupportedException

This stream does not support writing.

WriteRange(IntPtr, long)

Writes a range of bytes to the current stream, and advances the current position within this stream by the number of bytes written.

Declaration
public void WriteRange(IntPtr source, long count)
Parameters
Type Name Description
IntPtr source

A pointer to the location to start copying from.

long count

The number of bytes to copy from source to the current stream.

Remarks

In order to provide faster read/write, this operation doesn't check stream bound. A client must carefully not read/write above the size of this datastream.

Exceptions
Type Condition
NotSupportedException

This stream does not support writing.

WriteRange<T>(T[], int, int)

Writes an array of values to the current stream, and advances the current position within this stream by the number of bytes written.

Declaration
public void WriteRange<T>(T[] data, int offset, int count) where T : struct
Parameters
Type Name Description
T[] data

An array of values to be written to the stream.

int offset

The zero-based offset in data at which to begin copying values to the current stream.

int count

The number of values to be written to the current stream. If this is zero, all of the contents data will be written.

Type Parameters
Name Description
T

The type of the values to be written to the stream.

Remarks

In order to provide faster read/write, this operation doesn't check stream bound. A client must carefully not read/write above the size of this datastream.

Exceptions
Type Condition
NotSupportedException

This stream does not support writing.