static void AddSong() { bool done = false; do { string songName = CLI.Prompt("What's the name of the song? "); string artist = CLI.Prompt("Who's the artist? "); _songs.Add(new Song { Name = songName, Artist = artist }); done = CLI.Prompt("Add another song? (Y/N) ").ToLower() != "y"; } while (!done); }
/// <summary> /// Application entry point /// </summary> /// <param name="args">The arguments.</param> static void Main(string[] args) { CLI.DisplayWelcome(); int option = 0; while ((option = Menu.Prompt() != 3)) { switch (option) { case 1: AddSong(); break; case 2: DisplaySongList(); break; } } }
/// <summary> /// Application entry point /// </summary> /// <param name="args">The arguments.</param> static void Main(string[] args) { CLI.DisplayWelcome(); int option = 0; while (option != 3) { option = Menu.Prompt("Please select an option: "); Debug.WriteLine($"Option selected: {option}"); switch (option) { case 1: AddSong(); break; case 2: DisplaySongList(); break; } } }