BinaryPrimitives.TryWriteIntPtrBigEndian(Span<Byte>, IntPtr) Method

Definition

Writes a IntPtr into a span of bytes, as big endian.

public:
 static bool TryWriteIntPtrBigEndian(Span<System::Byte> destination, IntPtr value);
public static bool TryWriteIntPtrBigEndian (Span<byte> destination, IntPtr value);
static member TryWriteIntPtrBigEndian : Span<byte> * nativeint -> bool
Public Shared Function TryWriteIntPtrBigEndian (destination As Span(Of Byte), value As IntPtr) As Boolean

Parameters

destination
Span<Byte>

The span of bytes where the value is to be written, as big endian.

value
IntPtr

nativeint

The value to write into the span of bytes.

Returns

false if the span is too small to contain the value; otherwise, true.

Remarks

Writes exactly 4 bytes on 32-bit platforms -or- 8 bytes on 64-bit platforms to the beginning of the span.

Applies to