SequenceReaderExtensions.TryReadLittleEndian 方法

定义

重载

TryReadLittleEndian(SequenceReader<Byte>, Int16)

尝试将 Int16 读取为小字节序。

TryReadLittleEndian(SequenceReader<Byte>, Int32)

尝试将 Int32 读取为小字节序。

TryReadLittleEndian(SequenceReader<Byte>, Int64)

尝试将 Int64 读取为小字节序。

TryReadLittleEndian(SequenceReader<Byte>, Int16)

Source:
SequenceReaderExtensions.Binary.cs
Source:
SequenceReaderExtensions.Binary.cs
Source:
SequenceReaderExtensions.Binary.cs

尝试将 Int16 读取为小字节序。

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

参数

reader
SequenceReader<Byte>

要从中读取值的字节序列读取器实例。

value
Int16

当该方法返回时,作为小字节序从字节序列读取器读取的值。

返回

如果读取操作成功,则为 true;如果没有足够的数据用于 Int16,则为 false

适用于

TryReadLittleEndian(SequenceReader<Byte>, Int32)

Source:
SequenceReaderExtensions.Binary.cs
Source:
SequenceReaderExtensions.Binary.cs
Source:
SequenceReaderExtensions.Binary.cs

尝试将 Int32 读取为小字节序。

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

参数

reader
SequenceReader<Byte>

要从中读取值的字节序列读取器实例。

value
Int32

当该方法返回时,作为小字节序从字节序列读取器读取的值。

返回

如果读取操作成功,则为 true;如果没有足够的数据用于 Int32,则为 false

适用于

TryReadLittleEndian(SequenceReader<Byte>, Int64)

Source:
SequenceReaderExtensions.Binary.cs
Source:
SequenceReaderExtensions.Binary.cs
Source:
SequenceReaderExtensions.Binary.cs

尝试将 Int64 读取为小字节序。

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

参数

reader
SequenceReader<Byte>

要从中读取值的字节序列读取器实例。

value
Int64

当该方法返回时,作为小字节序从字节序列读取器读取的值。

返回

如果读取操作成功,则为 true;如果没有足够的数据用于 Int64,则为 false

适用于