BinaryPrimitives.TryReadUInt16BigEndian Método

Definição

Importante

Esta API não está em conformidade com CLS.

Lê um UInt16 desde o início de um intervalo somente leitura de bytes, como um grande endiano.

public:
 static bool TryReadUInt16BigEndian(ReadOnlySpan<System::Byte> source, [Runtime::InteropServices::Out] System::UInt16 % value);
[System.CLSCompliant(false)]
public static bool TryReadUInt16BigEndian(ReadOnlySpan<byte> source, out ushort value);
[<System.CLSCompliant(false)>]
static member TryReadUInt16BigEndian : ReadOnlySpan<byte> * uint16 -> bool
Public Shared Function TryReadUInt16BigEndian (source As ReadOnlySpan(Of Byte), ByRef value As UShort) As Boolean

Parâmetros

source
ReadOnlySpan<Byte>

O intervalo somente leitura de bytes a serem lidos.

value
UInt16

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 UInt16; caso contrário, false.

Atributos

Comentários

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

Aplica-se a