BinaryPrimitives.TryReadInt16BigEndian Método

Definição

Lê um Int16 desde o início de um período somente leitura de bytes, como um grande endian.

public:
 static bool TryReadInt16BigEndian(ReadOnlySpan<System::Byte> source, [Runtime::InteropServices::Out] short % value);
public static bool TryReadInt16BigEndian(ReadOnlySpan<byte> source, out short value);
static member TryReadInt16BigEndian : ReadOnlySpan<byte> * int16 -> bool
Public Shared Function TryReadInt16BigEndian (source As ReadOnlySpan(Of Byte), ByRef value As Short) As Boolean

Parâmetros

source
ReadOnlySpan<Byte>

O intervalo somente leitura de bytes a serem lidos.

value
Int16

Quando esse método é retornado, contém o valor lido do intervalo somente leitura de bytes, como big endian.

Retornos

true se o intervalo for grande o suficiente para conter um Int16; caso contrário, false.

Comentários

Lê exatamente 2 bytes desde o início do intervalo.

Aplica-se a