Binary File Writing / Object as source

jplocster

New member
Joined
Mar 21, 2003
Messages
4
I am trying to write out a bit for bit copy of a DataSet object. I am assuming I will have to somehow covert or copy the DataSet to a array of bytes or ints and then write those out with a BinaryWriter. I am having a hell of time with the conversion though. I have tried Marshalling but the Marshal does not take kindly to my DataSet. I am used to C++ and writing out dwords from a object pointer, then incrementing the pointer based on the sizeof the object. How can I do a similar thing in VB.NEt.

Thanks for any ideas.
 
Look in to Binary Serialization. You can only serialize types that are marked serializable with the Serializable() attribute though. You should be in luck with this particular class.
 
Back
Top