Пример #1
0
        public static NTree <T> CreateTree <T>(NTree <T> root, params NTree <T>[] children)
        {
            var clone = root.Clone();

            foreach (var child in children)
            {
                clone.AddChild(child);
            }

            return(clone);
        }
Пример #2
0
        public static NTree <T> CreateTree <T>(NTree <T> tree, params T[] children)
        {
            var clone = tree.Clone();

            foreach (var child in children)
            {
                clone.AddChild(child);
            }

            return(clone);
        }
Пример #3
0
 public void AddChild(NTree <T> data)
 {
     children.AddFirst(data.Clone());
 }