因此,当节点为空时,我的代码停止运行,但是 i 。
Node node = nodeMap[x]; (BREAKS HERE case x isn't in the tree yet)
if(node == null)
{
node = new Node();
node.Equals(x);
nodeMap.Add(x, node);
}
错误:System.dll 中出现“System.Collections.Generic.KeyNotFoundException”类型的未处理异常
附加信息:该键不在字典中。