Hi

I've tried moving a serialized hashtable made in WinXP (std .Net
framework), to a PocketPC device (Compact Framework). I've ran in to all
kinds of problems, and have not been able to get this to work. The
problem is not in the actual filecopy.

I've tried the CompactFormatter
(http://www.freewebs.com/compactFormatter/) for binary serialization.
No luck when deserializing on the device. CF wont deserializa std
framework, vice versa.

I've tried XML serialization from opennetcf
(http://www.opennetcf.org/library/OpenNETCF.Xml.Serialization.html). Got
a problem since Hashtable implement IDictionary. For some reason.

Is there another way to do this? Is there a reason why this should not
work, or is it me who's doing this all wrong.

If Hashtable in std framework is differently implemented than the
Hashtable in CF, that would explain incompatibility when deserializing.
But is that the case?

Thanks,
Finn

Re: Serialized Hashtable by Alex

Alex
Mon Aug 16 14:00:52 CDT 2004

I suggest instead serializing two arrays - Keys and Values using CopyTo
method. On the other end add the values to the new collection in a loop.

"Finn J Johnsen" <finn@OSLO.no> wrote in message
news:412098a0$1@news.broadpark.no...
> Hi
>
> I've tried moving a serialized hashtable made in WinXP (std .Net
> framework), to a PocketPC device (Compact Framework). I've ran in to all
> kinds of problems, and have not been able to get this to work. The problem
> is not in the actual filecopy.
>
> I've tried the CompactFormatter
> (http://www.freewebs.com/compactFormatter/) for binary serialization. No
> luck when deserializing on the device. CF wont deserializa std framework,
> vice versa.
>
> I've tried XML serialization from opennetcf
> (http://www.opennetcf.org/library/OpenNETCF.Xml.Serialization.html). Got a
> problem since Hashtable implement IDictionary. For some reason.
>
> Is there another way to do this? Is there a reason why this should not
> work, or is it me who's doing this all wrong.
>
> If Hashtable in std framework is differently implemented than the
> Hashtable in CF, that would explain incompatibility when deserializing.
> But is that the case?
>
> Thanks,
> Finn