static async Task Main(string[] args) { Console.WriteLine("Retriving trivia question...."); TriviaClient trivia = new TriviaClient(); TriviaResponse result = await trivia.GetTriviaQuestionsAsync(3); DisplayQuestions(result.Results);; }
static async Task Main(string[] args) { TriviaClient trivia = new TriviaClient(); TriviaResponse result = await trivia.GetTriviaQuestions(3); // 3 questions returned Console.WriteLine("Received trivia questions. \n\n"); Console.WriteLine(result.results[0].question); Console.ReadKey(); }
static async Task Main() { TriviaClient trivia = new TriviaClient(); TriviaResponse result = await trivia.GetTriviaQuestionsAsync(3); Console.WriteLine("Received trivia questions.\n\n"); //Print out each question one by one, followed by their answers, then the correct answer. DisplayQuestions(result.results); Console.ReadKey(); }
static async Task Main(string[] args) { Console.WriteLine("Retrieving trivia questions..."); TriviaClient trivia = new TriviaClient(); string result = await trivia.GetTriviaQuestions(); Console.WriteLine("Received trivia questions. \n\n"); Console.WriteLine(result); Console.ReadKey(); }
public static async Task Main(string[] args) { Console.WriteLine("Retrieving trivia questions...."); TriviaClient triviaClient = new TriviaClient(); TriviaResponse result = await triviaClient.GetTriviaQuestions(3); Console.WriteLine("Recieved trivia questions. \n"); // Print out each question one by one, followed by their answers, then the correct answer DisplayQuestions(result.results); Console.ReadKey(); }