Ok i have this :
if(something!=null)
{
SubMenu.Add(new SubMenuModel("PERSONAL_INFORMATION","account.personalinformation","/account/personalinformation"));
}
if(something123!=null)
{
SubMenu.Add(new SubMenuModel("NOTIFICATIONS", "account.notificationsettings", "/account/notifications"));
}
SubMenu.Add(new SubMenuModel("CHANGE_PASSWORD", "account.changepassword", "/account/passwordchange"));
SubMenu.Add(new SubMenuModel("GAME_SETTINGS", "default", "default"));
MainMenu.Add(new MainMenuModel("SETTINGS", "default", "default", true,
}));
EDIT:
public List<SubMenuModel> SubMenu { get; set; }
public List<MainMenuModel> MainMenu { get; set; }
How can i add this SubMenu
into Main menu
because i have condition so if condition is !=null add to list...any sugesstion?