using System.Collections.Generic;
using Newtonsoft.Json.Linq;
public PokeItem(string name, string url)
public string Name { get; set; }
public static void Main()
public static async void GetPokemon()
string baseUrl = "http://pokeapi.co/api/v2/pokemon/";
using (HttpClient client = new HttpClient())
Console.WriteLine("Hello World 2");
using (HttpResponseMessage res = await client.GetAsync(baseUrl))
Console.WriteLine("Hello World 3");
using (HttpContent content = res.Content)
var data = await content.ReadAsStringAsync();
Console.WriteLine("data------------{0}", JObject.Parse(data)["results"]);
Console.WriteLine("NO Data----------");
catch(Exception exception)
Console.WriteLine("Exception Hit------------");
Console.WriteLine(exception);