java: public static List<Tree> getChildren(Tree t) {List<Tree> kids = new ArrayList<Tree>();for (int i=0; i<t.getChildCount(); i++) {kids.add(t.getChild(i));}return kids;}
C#: public static IList<ITree> GetChildren(ITree t){IList<ITree> kids = new List<ITree>();for (int i = 0; i < t.ChildCount; i++){kids.Add(t.GetChild(i));}return kids;}