示例#1
0
 public static void PrintChain(IntNode chain)
 {
     for (; chain != null; chain = chain.GetNext())
     {
         Console.Write("" + chain + "->");
     }
     Console.WriteLine("#");
 }
示例#2
0
        static void Insert(int x)
        {
            if (null == chain)
            {
                chain = new IntNode(x);
                return;
            }
            IntNode temp = new IntNode(x, chain.GetNext());

            chain.SetNext(temp);
        }