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)
--------------------
From: John Dann <ne**@prodata.co.uk>
Newsgroups: microsoft.public.dotnet.languages.vb
Subject: Simple Q re Deserialisation
Date: Mon, 21 Jun 2004 17:03:29 +0100
Lines: 11
Message-ID: <la********************************@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de gwMfWC1ysSC0p18k55XNKwvsCyXI0iRML9Ni5O4IJ0Nm1QvnkL
X-Newsreader: Forte Agent 1.93/32.576 English (American)
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!news-out.cwix.com!newsfeed.cwix.com!news.tele.dk!news.t ele.dk!
small.news.tele.dk!fu-berlin.de!uni-berlin.de!not-for-mailXref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.languages.vb:211305
X-Tomcat-NG: microsoft.public.dotnet.languages.vb
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