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

Serialization of Objects

P: n/a
If I have an object that has the following structure:

SerializableObject
Several Private Variable
One Private CustomCollectionObject

Do I also need to make the CustomCollectionObject serializable as well, or
would making SerializableObject serializable be fine?

Basically does serializing SerializableObject imply that
CustomCollectionObject is serialized as well?

Thanks.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

Making the outer class serializable implies that all its instance variables
will be serialized (unless you mark some of them as <NotSerializable()>.
However this does not mean that all variables will be _able_ to serialize.
In fact if some of them are not serializable by themself (their types are
not serializable), then not only those fields will not serialize, but the
whole class will not be able to serialize.

Vladimir [VB.NET team]
--------------------
| Newsgroups: microsoft.public.dotnet.languages.vb
| Subject: Serialization of Objects
| From: Lucas Tam <RE********@rogers.com>
| Organization: None of Your Business!!!
| Message-ID: <Xn***************************@140.99.99.130>
| User-Agent: Xnews/06.02.16
| X-Face:
#gFwhH/LPM9"eq<Dzb3~[P'7%dS98vHkcFbX;SjezglosS.OP?:tzhHT7o=G03o0%St#;xT bMCCP
'rF/EnVDK-y*a(Qh3J)+Fn]"/&@D(dOG=ITH!\afBA$O}D";gSvoEpfd
| Reply-To: RE********@rogers.com
| Lines: 18
| X-Complaints-To: ab***@easynews.com
| X-Complaints-Info: Please be sure to forward a copy of ALL headers
otherwise we will be unable to process your complaint properly.
| Date: Mon, 22 Sep 2003 22:03:49 GMT
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin
e.de!newsfeed.freenet.de!newsfeed.news2me.com!news feed2.easynews.com!easynew
s.com!easynews!easynews-local!news.easynews.com.POSTED!not-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:140417
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| If I have an object that has the following structure:
|
| SerializableObject
| Several Private Variable
| One Private CustomCollectionObject
|
| Do I also need to make the CustomCollectionObject serializable as well,
or
| would making SerializableObject serializable be fine?
|
| Basically does serializing SerializableObject imply that
| CustomCollectionObject is serialized as well?
|
| Thanks.
|
| --
| Lucas Tam (RE********@rogers.com)
| Please delete "REMOVE" from the e-mail address when replying.
| http://members.ebay.com/aboutme/coolspot18/
|

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.