By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,990 Members | 2,324 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,990 IT Pros & Developers. It's quick & easy.

Passing arguments when deserializing objects

P: n/a
Hi All,

I have an object that gets serialized, now when the object gets deserialized
I what to be able to pass it an object reference which is not serialized and
is used internally by the class. Does anyone now how I can pass an object
reference to the class when it is being deserialized. I am using the
BinaryFormatter classes to serialize/deserialize the objects.

Thanks
Neal
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Neal,

You will need to roll you own interface for the serialization and
deserialization of your objects.

Dan

"Neal Andrews" <neal@NOSPAN_ALIAS.com> wrote in message
news:eC**************@TK2MSFTNGP11.phx.gbl...
Hi All,

I have an object that gets serialized, now when the object gets deserialized I what to be able to pass it an object reference which is not serialized and is used internally by the class. Does anyone now how I can pass an object
reference to the class when it is being deserialized. I am using the
BinaryFormatter classes to serialize/deserialize the objects.

Thanks
Neal

Nov 20 '05 #2

P: n/a
Neal,
Although I do not have a specific example, I understand that is what the
StreamingContext.Context property is used for that is part of the
ISerializable interface.

For details on StreamingContext & ISerializable see:
http://msdn.microsoft.com/msdnmag/issues/02/04/net/
http://msdn.microsoft.com/msdnmag/issues/02/07/net/
http://msdn.microsoft.com/msdnmag/issues/02/09/net/

Hope this helps
Jay

"Neal Andrews" <neal@NOSPAN_ALIAS.com> wrote in message
news:eC**************@TK2MSFTNGP11.phx.gbl...
Hi All,

I have an object that gets serialized, now when the object gets deserialized I what to be able to pass it an object reference which is not serialized and is used internally by the class. Does anyone now how I can pass an object
reference to the class when it is being deserialized. I am using the
BinaryFormatter classes to serialize/deserialize the objects.

Thanks
Neal

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.