serialize more complex objects
Hello,
in chapter 5 (prof asp.net webserv.) wrox gave a sample of serialising complex objects but typically they use an arraylist for bilding more complex objects.
But what if I want to code a different way and implement a list by myself?
I changed the order-object in that I use my own list creating object but then serialisation fails. So my question: How serialize this order-object?
wkr: Wilhelm Pieper
public class Order: Object
{
..
private LinearList _OrderItems;
public class LinearList
{
public ListItem Head = null;
public ListItem Current = null;
public int Count = 0;
public class ListItem{
public OrderItem OI = null;
public ListItem Next=null;
public ListItem(){}
}
public LinearList(){}
public void Add(OrderItem oI)
{
if (Head == null)
{
Head = new ListItem();
Head.OI = oI;
Head.Next = null;
}
else
{
..
}
Count++;
}
..
}
|