IBinaryInteger<TSelf>.TryReadLittleEndian 方法

定义

尝试以 little-endian 格式从范围中读取二进制的补数,并将其转换为当前类型的实例。

public:
 static bool TryReadLittleEndian(ReadOnlySpan<System::Byte> source, bool isUnsigned, [Runtime::InteropServices::Out] TSelf % value);
public static abstract bool TryReadLittleEndian (ReadOnlySpan<byte> source, bool isUnsigned, out TSelf value);
static member TryReadLittleEndian : ReadOnlySpan<byte> * bool * 'Self -> bool
Public Shared Function TryReadLittleEndian (source As ReadOnlySpan(Of Byte), isUnsigned As Boolean, ByRef value As TSelf) As Boolean

参数

source
ReadOnlySpan<Byte>

应从中读取两者补号的跨度。

isUnsigned
Boolean

true 如果 source 表示无符号二的补码,则为 ;否则, false 指示它表示有符号二的补码。

value
TSelf

返回时,如果无法读取值,则包含从 sourcedefault 读取的值。

返回

true 如果成功从中读取值,则为 source;否则为 false

适用于