//This method creates a sub-forum static void createSubForum(string title, string parent, List <string> moderators, ForumSystem forumSystem) { SubForum subForum = new SubForum(0, title, moderators, parent); foreach (Forum forum in forumSystem.getForums()) { if (string.Equals(forum.getTitle(), parent)) { forum.addSubForum(subForum); } } }
//This method creates a sub-forum public void createSubForum(string title, string parent, List <string> moderators, ForumSystem forumSystem) { SubForum subForum = new SubForum(title, moderators, parent); foreach (Forum forum in forumSystem.getForums()) { if (string.Equals(forum.title, parent)) { forum.getSubForums().Add(subForum); } } }
//This method adds a sub-forum to the current forum public void addSubForum(SubForum subForum) { subForums.Add(subForum); }