Exemplo n.º 1
0
 public List <Node> GetChilds()
 {
     if (Childs.Count > 0)
     {
         var res = Childs.SelectMany(n => n.GetChilds()).ToList();
         res.Add(this);
         return(res);
     }
     else
     {
         return new List <Node> {
                    this
         }
     };
 }