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

Definition

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

public static void WriteIntPtrBigEndian(Span<byte> destination, IntPtr value);

Parameters

destination
Span<Byte>

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

value
IntPtr

The value to write into the span of bytes.

Exceptions

destination is too small to contain a IntPtr.

Remarks

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

Applies to

Product Versions
.NET 8, 9, 10