void PrintNodeList(object aNodeList) { Console.WriteLine("Node list:"); foreach (AStarNode n in (aNodeList as IEnumerable)) { //n.PrintNodeInfo(); } Console.WriteLine("====="); }