예제 #1
0
 public static void remove_all(F.TreeNodeCollection collection, @predicate d)
 {
     foreach (F.TreeNode n in collection)
     {
         if(d(n))
         {
             collection.Remove(n);
         }
     }
 }
예제 #2
0
 public static F.TreeNode find(F.TreeNodeCollection collection, @predicate d)
 {
     foreach (F.TreeNode n in collection)
     {
         if (d(n))
         {
             return n;
         }
     }
     return null;
 }