I need to store (as a field on a class) a contiguous block of memory. In Xojo, I used a class called a MemoryBlock
. It looks like C# provides the Span<T>
and Memory<T>
structs which do what I need. The Span<T>
struct can’t be used as a field for a class on the heap but Memory<T>
can. I’m using Elements RTL. I don’t see Memory<T>
in the RTL docs. Does that mean it isn’t supported?
Essentially, I need to store bytecode for a VM I’m writing an I thought it would be better performing to store it as a Memory<T>
than an array of byte
. Does anyone have any suggestions about this?