IBinaryInteger<TSelf>.TryReadBigEndian Method

Definition

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

public:
 static bool TryReadBigEndian(ReadOnlySpan<System::Byte> source, bool isUnsigned, [Runtime::InteropServices::Out] TSelf % value);
public static abstract bool TryReadBigEndian (ReadOnlySpan<byte> source, bool isUnsigned, out TSelf value);
static member TryReadBigEndian : ReadOnlySpan<byte> * bool * 'Self -> bool
Public Shared Function TryReadBigEndian (source As ReadOnlySpan(Of Byte), isUnsigned As Boolean, ByRef value As TSelf) As Boolean

Parameters

source
ReadOnlySpan<Byte>

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

isUnsigned
Boolean

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

value
TSelf

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

Returns

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

Applies to