System.Runtime.InteropServices by Microsoft

<PackageReference Include="System.Runtime.InteropServices" Version="4.0.20-beta-22816" />

 SafeBuffer

public abstract class SafeBuffer : SafeHandle
public ulong ByteLength { get; }

protected SafeBuffer(bool ownsHandle)

public void AcquirePointer(ref byte pointer)

public void Initialize(uint numElements, uint sizeOfEachElement)

public void Initialize(ulong numBytes)

public void Initialize<T>(uint numElements) where T : struct

public T Read<T>(ulong byteOffset) where T : struct

public void ReadArray<T>(ulong byteOffset, T[] array, int index, int count) where T : struct

public void ReleasePointer()

public void Write<T>(ulong byteOffset, T value) where T : struct

public void WriteArray<T>(ulong byteOffset, T[] array, int index, int count) where T : struct