private Menu NovoMenu(string nome, params string[] SubMenus) { Menu menu = new Menu(); menu.Nome = nome; foreach (string nomeSubMenu in SubMenus) { Menu submenu = new Menu(); submenu.Nome = nomeSubMenu; menu.SubMenu.Add(submenu); } return menu; }
private Menu NovoMenu(string nome, params string[] SubMenus) { Menu menu = new Menu(); menu.Nome = nome; foreach (string nomeSubMenu in SubMenus) { Menu submenu = new Menu(); submenu.Nome = nomeSubMenu; submenu.Url = "/Noticia/"; for (int i = 0; i < 2; i++) { Menu sub = new Menu(); sub.Nome = "sub3"; sub.Url = "/Noticia/"; sub.SubMenu.Add(sub); } menu.SubMenu.Add(submenu); } return menu; }