J
Jesse Houwing
Hey all,
I'm inheriting an old project and it contains a piece of code that is
used to read/write an object tree to a binary file. We want to keep the
actual file format in tact, but I'm looking for an easier way to do the
serialization. I've been looking at the Binary Serializer (but it
includes a lot of type information), which doesn't seem to apply here.
I also looked at the Interop namespace and found that the way structs
are formatted/convertedfor interop calls comes pretty close to what I need.
Does anyone have a link or an example on how I could convert a tree of
structs into a simple binary file and read them back out again?
The current solution just creates a byte array and populates the values,
then writing the array to a stream and vice versa.
I'm inheriting an old project and it contains a piece of code that is
used to read/write an object tree to a binary file. We want to keep the
actual file format in tact, but I'm looking for an easier way to do the
serialization. I've been looking at the Binary Serializer (but it
includes a lot of type information), which doesn't seem to apply here.
I also looked at the Interop namespace and found that the way structs
are formatted/convertedfor interop calls comes pretty close to what I need.
Does anyone have a link or an example on how I could convert a tree of
structs into a simple binary file and read them back out again?
The current solution just creates a byte array and populates the values,
then writing the array to a stream and vice versa.