Table of Contents

Method TryReadLittleEndian

Namespace
Zyl.VectorTraits.ExTypes
Assembly
VectorTraits.dll

TryReadLittleEndian(ReadOnlySpan<byte>, bool, out ExUInt128)

Tries to read a two's complement number from a span, in little-endian format, and convert it to an instance of the current type.

public static bool TryReadLittleEndian(ReadOnlySpan<byte> source, bool isUnsigned, out ExUInt128 value)

Parameters

source ReadOnlySpan<byte>

The span from which the two's complement number should be read.

isUnsigned bool

true if source represents an unsigned two's complement number; otherwise, false to indicate it represents a signed two's complement number.

value ExUInt128

On return, contains the value read from source or default if a value could not be read.

Returns

bool

true if the value was succesfully read from source; otherwise, false.