Representation of Hashtable different in CF and the normal Framework?

A

André Giesing

Hello NG!

I've got a short question:
Is there a difference of the internal representation of a Hashtable between
the Compact Framework and the normal Framework?

I've got the suspicion, because when I Serialize the same Object (with a
Hashtable in it) on a Computer with the normal .NET Framework and on a
mobile Device (which uses the Compact Framework) the byteStream is
different!
The byteStream of the mobile Device is always a little smaller!
And therefore the Desirialization of the Object on the other side fails :-(

For Serialization and Deserialization I use the CompactFormatter which works
pretty good. Locally (when I Serialize and Deserialize on the same Device
with the same Framework) it works!
Objects without a Hashtable also work (even the Deserialization on the other
side)!

So I guess that the representation of a Hashtable between the two Frameworks
might be different.

Could that be?
Or am I on the wrong way?
Any Ideas?

Greetings,
André
 
A

Alex Feinman [MVP]

As with any sealed class you cannot expect the internal implementation to be
identical across platforms. Angelo Scotto, who wrote CompactFormatter points
out that he took some special pains to make DataSet serialization portable.
Hashtable will probably require similar extra effort. Or you can write a
custom serialization routine for your Hashtable field
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top