I fixed these and somehow the files went walkabout.
In summary, in some places structs are expected, and that's fine in the C++ code because they're accessed by reference. In C#, when an item is picked from an array and it's a value type (e.g. a struct), what you get is a copy. The upshot is that mutating the object mutates the copy that you got, and not the item in the array. As a consequence, I had to use classes for several types. And a knock-on effect is that they then must be explicitly instantiated with the new keyword.
I fixed these and somehow the files went walkabout.
In summary, in some places structs are expected, and that's fine in the C++ code because they're accessed by reference. In C#, when an item is picked from an array and it's a value type (e.g. a struct), what you get is a copy. The upshot is that mutating the object mutates the copy that you got, and not the item in the array. As a consequence, I had to use classes for several types. And a knock-on effect is that they then must be explicitly instantiated with the new keyword.