public static void DivideEvens(BinTreeNode <int> r) { if (r == null) { return; } if (r.GetValue() % 2 == 0) { r.SetValue(r.GetValue() / 2); } DivideEvens(r.GetLeft()); DivideEvens(r.GetRight()); }