Example #1
0
 public void CountElements(Element element)
 {
     element.Accept(this);
     if (element.Link != null)
     {
         CountElements(element.Link);
     }
     if (element.Next != null)
     {
         CountElements(element.Next);
     }
 }
Example #2
0
 public void Visit(Element element)
 {
     Count++;
 }