Click or drag to resize

OffsetDataReaderExtensionsReadBytes Method (IOffsetDataReader, Int32, Int32)

Reads a number of bytes at offset in the buffer.

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

Parameters

reader
Type: Demo3D.IOIOffsetDataReader
The data reader.
offset
Type: SystemInt32
The offset into the buffer to start reading.
length
Type: SystemInt32
The number of bytes to read.

Return Value

Type: 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