Serialization and UDTs (Visual Basic.Net)

  • Thread starter Thread starter Ursula Peter-Czichi
  • Start date Start date
U

Ursula Peter-Czichi

I have not planned data persistence at the beginning of a
larger project. This now causes some problems.
Doing some tests, I have figured out how to serialize and
deserialize simple variables as well as a sorted list.
Here is the problem:
My classes contain both, a sorted list and simple data
types. Two classes contain two sorted lists each. There
are no errors in the serialization part (on closing),
however, there is a problem deserializing the data.
According to the error message, there is a casting
problem.
How do I get the deserializer to understand the data
structure? Does anyone know a good example for
using "ideserialize" in VB? Should I rather serialize
ILists (more than one set)?
How are serialized data stored? Will they be deserialized
sequentially, moving through all data and data sets? For
two sorted lists that would be IList1(keylist)+ IList
(valuelist) + Ilist2(keylist) + IList2(valuelist). I
already put default values into all empty fields to avoid
errors. Still, serialization has not worked this way.

Thanks for any pointers,

Ursula
 
The solution is a restructured program with a few more
components and 2 global variables. However, the trade-off
is the ability to dynamically load and unload very small
datalists as needed.
 
Back
Top