How to Deserialize to a specific object instance.

  • Thread starter Thread starter MP
  • Start date Start date
M

MP

Hi,
I would like to be able to deserialize a stream to a specific instance.
Deserialize returns me a new instances and that is not really what we need,
we need to deserialized to an existing instance. Can anyone point me in the
rigth direction?


Regards

-Martin
 
when deserialize(re-hydrate) an object from an XML stream it creates a new
instance of the type so therefore it will have a completely different hash
code (GetHashCode()). If you want to map this onto an already existing
instance of the type you will have to do this after the deserialization has
been compeleted.

HTH


Ollie Riches
 
Thank you Ollie,
Then the obvious question is: Is there a simple way map one instance of
an object onto another? Kind of a copy operator....

Thank you again.

-Martin
 
Well.... I just figured it out. Now, I just need to get this working with
remoting.

-Martin
 
MP,

How did you do it? I need to do the same thing.

Thanks,

John

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

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

Back
Top