Click or drag to resize

DataReaderExtensionsConsume Method

Returns a new data reader pointing to the next length bytes, and advances the current packet position. Implies EnsureAsync(length).

Namespace:  Demo3D.IO
Assembly:  Demo3D.IO (in Demo3D.IO.dll) Version: 15.0.2.11458
Syntax
C#
public static IBufferReader Consume(
	this IDataReader reader,
	int length
)

Parameters

reader
Type: Demo3D.IOIDataReader
The data reader.
length
Type: SystemInt32
The number of bytes to peek.

Return Value

Type: IBufferReader
A new PacketReader containing the peeked data.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDataReader. 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).
See Also