BinaryPrimitives.TryReadUInt16BigEndian Método

Definição

Importante

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

Lê a UInt16 partir do início de um intervalo de bytes de apenas leitura, como big endian.

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 de bytes para leitura e apenas leitura.

value
UInt16

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

Atributos

Observações

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

Aplica-se a