Simple Q re Deserialisation

  • Thread starter Thread starter John Dann
  • Start date Start date
J

John Dann

I need to read a binary file (whose structure I know - at least in
generic terms) and just learning about how best to do it.

Looking at deserialisation this seems to be one direct approach. But
from what I've read thus far I'm unclear about whether a binary file
needs to have been created with serialise before it can be read with
deserialise (ie is there some information added to the file) or can
deserialise be used with any binary file provided you know its
structure and read it in to a set of appropriate variables?

JGD
 
Hi John,

In general, you want to create your file using serialization and then read it using deserialization. This insures that the way the data is serialized matches
what yu expect as you read it. There's nothing unique added to the file to indicate the data was serialized, it has more to do with the structure of the data
itself. If you know this structure, then you can create the file anyway you please.

Hope this helps,
Craig VB .Net Team

-------------------------------------------------------------------

This reply is provided AS IS, without warranty (express or implied)


--------------------
 
Back
Top