我对不同类型的成员有这样的对象:
public class Node
{
public int itemID = -1;
public int counter = 1;
public Node parent = null;
public List<Node> childs = new List<Node>();
public Node nodeLink = null;
}
我有课堂树
public class tree
{
public List<int> headerList = null;
public Dictionary<int, Node> mapItemNodes = new Dictionary<int, Node>();
public Dictionary<int, Node> mapItemLastNode = new Dictionary<int, Node>();
public Node root = new Node();
}
我需要你的帮助来序列化和反序列化类树的对象,该对象包括其字典中的类节点的对象。