public void DisplayItem(IComponent currentComponent) { Console.Write(currentComponent.Display()); if (currentComponent.Items() !=null) { foreach (IComponent currentItem in currentComponent.Items()) { if (null != currentItem) { DisplayItem(currentItem); } } } }