|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Serialization of Object Graph (Inheriting ArrayList)Here is the deal: I have the following Object Graph: Icell (Interface) Iline (Interface) Itable (Interface) Classes: Cell: implements Icell Line: inherits Arraylist Implements Iline Table: inherits Arraylist Implements Itable And I want to serialize Class Table to a file. Cell will contain Object types (Date, String, Decimal). Line will just implement the property Item to find a given Cell in the ArrayList. And Table will enable the methods Add, Remove, RemoveAt, Clear, TrimToSize & the property Count. My question is: Should I do the following to serialize <Serializable()> Class Cell .... <Serializable()> Class Line .... Class Table Implements Iserializable, IdeserializationCallback .... OR <Serializable()> Class Cell .... Class Line Implements Iserializable, IdeserializationCallback .... Class Table Implements Iserializable, IdeserializationCallback .... OR something else ? Please Help!! Thank you. Lucile. hmm. I don't know about 2005, but in 2003, I gave up and made my own
serialization mechanism by defining an interface having Save Load Version methods Each class serialized/deserialized in these methods and used the stored version to limit new features on loading so that it could still load previously saved things with older versions. The built in stuff just seemed too much of a head ache. There is plenty to read about with it. Jeffery Richter wrote three good papers on it. I just came away with the impression that it was great to serialize over the network and for things you will immediately deserialize, but very hokey otherwise. Good luck, Shane Show quoteHide quote "Lucile" <lucile.di***@dexia-am.com> wrote in message news:1144134456.093602.117410@i40g2000cwc.googlegroups.com... > Hi to All, I am new to this newsgroup, so please bare with me. > Here is the deal: > I have the following Object Graph: > Icell (Interface) > Iline (Interface) > Itable (Interface) > > Classes: Cell: implements Icell > Line: inherits Arraylist > Implements Iline > Table: inherits Arraylist > Implements Itable > And I want to serialize Class Table to a file. Cell will contain Object > types (Date, String, Decimal). Line will just implement the property > Item to find a given Cell in the ArrayList. And Table will enable the > methods Add, Remove, RemoveAt, Clear, TrimToSize & the property Count. > > My question is: Should I do the following to serialize > <Serializable()> Class Cell .... > <Serializable()> Class Line .... > Class Table Implements Iserializable, IdeserializationCallback .... > > OR > > <Serializable()> Class Cell .... > Class Line Implements Iserializable, IdeserializationCallback .... > Class Table Implements Iserializable, IdeserializationCallback .... > > OR something else ? > > Please Help!! > > Thank you. > > Lucile. >
Dynamic DataGridView missing horizontal scrollbar
Suggestions to reduce memory use when splitting a string Accessing Properties within a Panel Inheritance Reflection Question and MDI question Form Focus Reading a Webpage Source with Cyrillic Characters Get the Application Icon?? get selected node from mouse right click Calendar Date Format |
|||||||||||||||||||||||