BinaryPrimitives.TryReadInt32BigEndian 方法

定義

從只讀位元組區段的開始讀取 , Int32 作為大端序。

public:
 static bool TryReadInt32BigEndian(ReadOnlySpan<System::Byte> source, [Runtime::InteropServices::Out] int % value);
public static bool TryReadInt32BigEndian(ReadOnlySpan<byte> source, out int value);
static member TryReadInt32BigEndian : ReadOnlySpan<byte> * int -> bool
Public Shared Function TryReadInt32BigEndian (source As ReadOnlySpan(Of Byte), ByRef value As Integer) As Boolean

參數

source
ReadOnlySpan<Byte>

唯讀的位元組範圍。

value
Int32

當此方法回傳時,包含從唯讀位元組區間讀取出來的值,作為大端序。

傳回

true若跨度足夠大以容納;Int32否則,。 false

備註

從區間起始處讀取正好 4 位元組。

適用於