static async Task Main(string[] args) { JokesGenerator jokesGenerator = new JokesGenerator(); string randomJoke = await jokesGenerator.GetRandomJoke(); Console.WriteLine(randomJoke); string[] categories = await jokesGenerator.GetCategories(); for (int index = categories.Length - 1; index >= 0; index--) { Console.WriteLine(categories[index]); } }
private void Button_Click(object sender, RoutedEventArgs e) { JokesGenerator jokesGenerator = new JokesGenerator(); string randomJoke = await jokesGenerator.GetRandomJoke(); }