M
Max Metral
I have a "high performance" application I'm building in C#. I have a
preparation program that builds a large file that is layed out "properly"
with indexes etc. So my goal is to read that file into a big byte array,
and pass offsets around to various functions and classes. My structure is
something like:
int Id;
int numItems;
byte[] foo;
int[] fooIds;
byte[] foobars;
now forget the variable length weirdness, I can get around that. My
question is, given a byte array and an offset, how could I tell C# that I
have a struct that begins at a certain point and access its members without
conversions or copies?
Thanks.
preparation program that builds a large file that is layed out "properly"
with indexes etc. So my goal is to read that file into a big byte array,
and pass offsets around to various functions and classes. My structure is
something like:
int Id;
int numItems;
byte[] foo;
int[] fooIds;
byte[] foobars;
now forget the variable length weirdness, I can get around that. My
question is, given a byte array and an offset, how could I tell C# that I
have a struct that begins at a certain point and access its members without
conversions or copies?
Thanks.