aggle-rithm
Ardent Formulist
I am working on a file parsing system in C#, and I want to share an array of bytes between objects, with each object only looking at a subset of the array. There is some overlap, as it breaks the file down into hierarchical structures, some of which contain subsets of the data within "child" objects, as well as the complete set.
In C++, this was fairly simple to do, since all I had to do was add the offset to the original pointer, and there was my new byte array. In C# it's more difficult because the array is an encapsulated object.
I've already started to work with one solution that wraps the array object in a class that allows subsets to be easily referred to, but I'm wondering if I'm missing an easier solution.
In C++, this was fairly simple to do, since all I had to do was add the offset to the original pointer, and there was my new byte array. In C# it's more difficult because the array is an encapsulated object.
I've already started to work with one solution that wraps the array object in a class that allows subsets to be easily referred to, but I'm wondering if I'm missing an easier solution.