using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TwoCamWPF
{
    class Tree<T>: List<Tree<T>>
    {
        public T Value
        {
            get;
            set;
        }

        public string Name
        {
            get;
            set;
        }

        public void Add(string Key, T _Value)
        {
            Tree<T> node = new Tree<T>() { Name = Key, Value = _Value };
            this.Add(node); 
        }

        public T this[string index] {
            get {
                return this.Find(p => p.Name == index).Value;
            }

        }

    }
}
