Question

I'm reformatting this question to be shorter and to the point. If I run a bunch of different custom objects through BinaryFormatter's Serialize method, I will get a bunch of serialized binary files. What is the best way to merge these binary files/retrieve them using Save/Load functionality in my app?

Was it helpful?

Solution

One way to do it is to make all those custom objects inherit from a single interface of your choosing.
Then make a class that will hold a list of objects of that interface.
Then, serialize that container class.
That is equivalent to what you're asking for, which is merge binaries together.
Instead of trying to do that, just one make a class that creates the binaries already together, without having to merge them later.

Is that what you're asking?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top