BinaryPrimitives.TryReadInt16BigEndian Método

Definição

Lê a Int16 partir do início de um intervalo de bytes só de leitura, como big 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 de bytes para leitura e apenas leitura.

value
Int16

Quando este método retorna, contém o valor lido do intervalo só de leitura dos bytes, como big endian.

Devoluções

true se o vão for suficientemente grande para conter um Int16; caso contrário, false.

Observações

Lê exatamente 2 bytes a partir do início do intervalo.

Aplica-se a