468,733 Members | 1,358 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,733 developers. It's quick & easy.

Simple Q re Deserialisation

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
Nov 20 '05 #1
1 936
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

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by delisonews | last post: by
3 posts views Thread by Patchwork | last post: by
8 posts views Thread by Dan | last post: by
6 posts views Thread by Manuel Collado | last post: by
7 posts views Thread by drewnoakes | last post: by
7 posts views Thread by abcd | last post: by
7 posts views Thread by nick.fletcher | last post: by
14 posts views Thread by Giancarlo Berenz | last post: by
10 posts views Thread by Phillip Taylor | last post: by
xarzu
2 posts views Thread by xarzu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.