public void Add(int[] places, int index, long count) { if (index == places.Length) { if (Places == null) { Places = places.Clone() as int[]; } Count += count; } else { if (_children == null) { _children = new ScenarioNode[places.Length]; } if (_children[places[index]] == null) { _children[places[index]] = new ScenarioNode(); } _children[places[index]].Add(places, index + 1, count); } }