Ejemplo n.º 1
0
        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]);
            }
        }
Ejemplo n.º 2
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     JokesGenerator jokesGenerator = new JokesGenerator();
     string         randomJoke     = await jokesGenerator.GetRandomJoke();
 }