Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Serialize an Interface (Collection of Generics)?

Status
Not open for further replies.

Insider1984

Technical User
Feb 15, 2002
132
US
Here is my initial problem which you guys helped with very quickly (THANK YOU)


I have a variable that keeps a list of Interfaces which lead to generic classes under them with very similar functions. I serialize the links out and read them in and things seem to work okay.... almost.... when I debug through the list... it is created with the right size but it's empty (null).


Any ideas?

=====================
Insider
4 year 'on the fly' programmer
C, C++, C#, MFC, Basic, Java ASP.NET
 
Humm actually, I looked into this a little bit more and can give more details.

The order of serialization tends to be:

Tool
InputItems
OutputItems

On deserialization however....the order changes

OutputItems
Tools
InputItems


I bomb because in Tools, Inputitems is created but their values are null until they are constructed after Tools. Tools uses these values on initialization.

InputItems and Output Items are both Generic children of ParamItems..... I talk to ParamItems through an interface IParamItems.

So the question is.... what controls the order of deserializing? Can I force a change of order? If so, how?


=====================
Insider
4 year 'on the fly' programmer
C, C++, C#, MFC, Basic, Java ASP.NET
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top