IBinaryInteger<TSelf>.TryReadBigEndian 方法

定义

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

public:
 static bool TryReadBigEndian(ReadOnlySpan<System::Byte> source, bool isUnsigned, [Runtime::InteropServices::Out] TSelf % value);
public static abstract bool TryReadBigEndian (ReadOnlySpan<byte> source, bool isUnsigned, out TSelf value);
static member TryReadBigEndian : ReadOnlySpan<byte> * bool * 'Self -> bool
Public Shared Function TryReadBigEndian (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

适用于