static void Main(string[] args) { TeamClient tc = new TeamClient(); Console.WriteLine("Want to see a list of teams in F1?"); var anwser = Console.ReadLine(); if (anwser != null && anwser.ToUpper() == "Y") foreach (var team in tc.GetTeamNames()) { Console.WriteLine(team); } Thread.Sleep(4000); Console.ReadKey(); }
private void buttonTeams_Click(object sender, EventArgs e) { TeamClient tc = new TeamClient(); textBoxResult.Text = string.Join(Environment.NewLine, tc.GetTeamNames()); }