static void Insert(int x) { if (null == chain) { chain = new IntNode(x); return; } IntNode temp = new IntNode(x, chain.GetNext()); chain.SetNext(temp); }
public void InsertAfter(IntNode temp) { temp.SetNext(this.GetNext()); this.SetNext(temp); }