public static void ShowSomeTrees(Forest forest) { foreach (var SomeTree in forest.SomeTrees) { ShowSomeTree(SomeTree); } }
public static void ShowFirTrees(Forest forest) { foreach (var firTree in forest.FirTrees) { ShowFirTree(firTree); } }
public static void ShowForest(Forest forest) { foreach (var tree in forest.AllTrees) { if (tree is FirTree) { ShowFirTree((FirTree)tree); } else if(tree is SomeTree) { ShowSomeTree((SomeTree)tree); } } }