public List <List <Talks> > GetScheduledTalksList(List <List <Talks> > combForMornSessions, List <List <Talks> > combForEveSessions) { List <List <Talks> > scheduledTalksList = new List <List <Talks> >(); int totalPossibleDays = combForMornSessions.Count; for (int dayCount = 0; dayCount < totalPossibleDays; dayCount++) { var talkList = new List <Talks>(); DateTime date = new DateTime(); date = date.Date.AddHours(9); date = date.AddMinutes(0); date = date.AddSeconds(0); int trackCount = dayCount + 1; String scheduledTime = $"{date:hh:mm tt}"; Console.WriteLine("Track " + trackCount + ":"); List <Talks> mornSessionTalkList = combForMornSessions[dayCount]; foreach (Talks talk in mornSessionTalkList) { talk.ScheduledTime = scheduledTime; talkList.Add(talk); Console.WriteLine(scheduledTime + $" {talk.Title}"); TimeSpan time = new TimeSpan(0, 0, talk.TimeDuration, 0); scheduledTime = _utils.GetNextScheduledTime(date, talk.TimeDuration); date = date.Add(time); } int lunchTimeDuration = 60; Talks lunchTalk = new Talks() { Name = "Lunch", Title = "lunch", TimeDuration = 60 }; lunchTalk.ScheduledTime = scheduledTime; talkList.Add(lunchTalk); Console.WriteLine(scheduledTime + " Lunch"); scheduledTime = _utils.GetNextScheduledTime(date, lunchTimeDuration); TimeSpan time3 = new TimeSpan(0, 0, 60, 0); date = date.Add(time3); List <Talks> eveSessionTalkList = combForEveSessions[dayCount]; foreach (Talks talk in eveSessionTalkList) { talk.ScheduledTime = scheduledTime; talkList.Add(talk); Console.WriteLine(scheduledTime + $" {talk.Title}"); scheduledTime = _utils.GetNextScheduledTime(date, talk.TimeDuration); TimeSpan time = new TimeSpan(0, 0, talk.TimeDuration, 0); date = date.Add(time); } Talks networkingTalk = new Talks() { Name = "Networking Event", Title = "Networking Event", TimeDuration = 60 }; networkingTalk.ScheduledTime = scheduledTime; talkList.Add(networkingTalk); Console.WriteLine(scheduledTime + " Networking Event\n"); scheduledTalksList.Add(talkList); } return(scheduledTalksList); }