using System.Threading.Tasks;
public static Promise<string> Test(string url) {
var promise = new Promise<string>((resolve, reject) =>
using (var client = new WebClient())
client.DownloadStringCompleted +=
System.Console.Write("endcccc");
client.DownloadStringAsync(new Uri(url), null);
public static void Main(string[] args)
Test("https://www.json-generator.com/api/json/get/ceVEQiYLnm").Then(r => System.Console.Write("ok"));
System.Console.Write("end");