Exemplo n.º 1
0
 private Node Search(int number, Node exclude = null)
 {
     if (Number == number)
     {
         return(this);
     }
     foreach (var sibling in Siblings.Except(new[] { exclude }))
     {
         Node result = sibling.Search(number, this);
         if (result != null)
         {
             return(result);
         }
     }
     return(null);
 }