//Given a node, fans a recursive tree out to catch all nodes connected by links to it void ConnectedNodes(CNode startingNode, List<CNode> toIgnore) { toIgnore.Add (startingNode); foreach (CNode otherNode in startingNode.ConnectedTo()) { if(!toIgnore.Contains(otherNode)) { ConnectedNodes(otherNode, toIgnore); } } }
//Given a node, fans a recursive tree out to catch all nodes connected by links to it void ConnectedNodes(CNode startingNode, List <CNode> toIgnore) { toIgnore.Add(startingNode); foreach (CNode otherNode in startingNode.ConnectedTo()) { if (!toIgnore.Contains(otherNode)) { ConnectedNodes(otherNode, toIgnore); } } }