BinaryPrimitives.TryReadIntPtrLittleEndian 方法

定義

從一個只讀位元組區段的開頭讀取 a IntPtr ,作為小端序。

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

參數

source
ReadOnlySpan<Byte>

唯讀的位元組範圍。

value
IntPtr

nativeint

當此方法回傳時,包含從唯讀位元組區間中讀取的值,作為小恩序。

傳回

false若張成太小無法包含 IntPtr;否則,。 true

備註

從區間起始,在 32 位元平台上讀取 4 位元組,或在 64 位元平台讀取 8 位元組。

適用於