Click or drag to resize

OffsetDataReaderExtensionsReadBytes(IOffsetDataReader, Int32, Int32) Method

Reads a number of bytes at offset in the buffer.

Namespace: Demo3D.IO
Assembly: Demo3D.IO (in Demo3D.IO.dll) Version: 19.00.00
Syntax
C#
public static BufferSegment ReadBytes(
	this IOffsetDataReader reader,
	int offset,
	int length
)

Parameters

reader  IOffsetDataReader
The data reader.
offset  Int32
The offset into the buffer to start reading.
length  Int32
The number of bytes to read.

Return Value

BufferSegment
The value read.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IOffsetDataReader. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
The buffer returned may be a copy of the data. For a PacketReader the data is effectively immutable, it doesn't matter. For a PacketWriter it means that there's no guarantee that the buffer returned will reflect subsequent changes to the data in the packet.
See Also