SequenceReaderExtensions.TryReadBigEndian 方法

定义

重载

TryReadBigEndian(SequenceReader<Byte>, Int16)

尝试将 Int16 读取为大字节序。Tries to read an Int16 as big endian.

TryReadBigEndian(SequenceReader<Byte>, Int32)

尝试将 Int32 读取为大字节序。Tries to read an Int32 as big endian.

TryReadBigEndian(SequenceReader<Byte>, Int64)

尝试将 Int64 读取为大字节序。Tries to read an Int64 as big endian.

TryReadBigEndian(SequenceReader<Byte>, Int16)

尝试将 Int16 读取为大字节序。Tries to read an Int16 as big endian.

public:
[System::Runtime::CompilerServices::Extension]
 static bool TryReadBigEndian(System::Buffers::SequenceReader<System::Byte> % reader, [Runtime::InteropServices::Out] short % value);
public static bool TryReadBigEndian (this ref System.Buffers.SequenceReader<byte> reader, out short value);
static member TryReadBigEndian : SequenceReader * int16 -> bool
<Extension()>
Public Function TryReadBigEndian (ByRef reader As SequenceReader(Of Byte), ByRef value As Short) As Boolean

参数

reader
SequenceReader<Byte>

要从中读取值的字节序列读取器实例。The byte sequence reader instance from which the value is to be read.

value
Int16

当该方法返回时,作为大字节序从字节序列读取器读取的值。When the method returns, the value read out of the byte sequence reader, as big endian.

返回

Boolean

如果读取操作成功,则为 true;如果没有足够的数据用于 Int16,则为 falsetrue if the read operation is successful; false if there isn't enough data for an Int16.

适用于

TryReadBigEndian(SequenceReader<Byte>, Int32)

尝试将 Int32 读取为大字节序。Tries to read an Int32 as big endian.

public:
[System::Runtime::CompilerServices::Extension]
 static bool TryReadBigEndian(System::Buffers::SequenceReader<System::Byte> % reader, [Runtime::InteropServices::Out] int % value);
public static bool TryReadBigEndian (this ref System.Buffers.SequenceReader<byte> reader, out int value);
static member TryReadBigEndian : SequenceReader * int -> bool
<Extension()>
Public Function TryReadBigEndian (ByRef reader As SequenceReader(Of Byte), ByRef value As Integer) As Boolean

参数

reader
SequenceReader<Byte>

从中读取值的字节序列读取器。The byte sequence reader from which to read the value.

value
Int32

当该方法返回时,作为大字节序从字节序列读取器读取的值。When the method returns, the value read out of the byte sequence reader, as big endian.

返回

Boolean

如果读取操作成功,则为 true;如果没有足够的数据用于 Int32,则为 falsetrue if the read operation is successful; false if there isn't enough data for an Int32.

适用于

TryReadBigEndian(SequenceReader<Byte>, Int64)

尝试将 Int64 读取为大字节序。Tries to read an Int64 as big endian.

public:
[System::Runtime::CompilerServices::Extension]
 static bool TryReadBigEndian(System::Buffers::SequenceReader<System::Byte> % reader, [Runtime::InteropServices::Out] long % value);
public static bool TryReadBigEndian (this ref System.Buffers.SequenceReader<byte> reader, out long value);
static member TryReadBigEndian : SequenceReader * int64 -> bool
<Extension()>
Public Function TryReadBigEndian (ByRef reader As SequenceReader(Of Byte), ByRef value As Long) As Boolean

参数

reader
SequenceReader<Byte>

要从中读取值的字节序列读取器实例。The byte sequence reader instance from which the value is to be read.

value
Int64

当该方法返回时,作为大字节序从字节序列读取器读取的值。When the method returns, the value read out of the byte sequence reader, as big endian.

返回

Boolean

如果读取操作成功,则为 true;如果没有足够的数据用于 Int64,则为 falsetrue if the read operation is successful; false if there isn't enough data for an Int64.

适用于