Advertisement
Guest User

Untitled

a guest
Sep 26th, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1. using System;
  2. using System.Net;
  3. using System.Threading.Tasks;
  4.                    
  5. public class Program
  6. {
  7.     public static void Main()
  8.     {
  9.             var count = 0;
  10.  
  11.             Parallel.For(0, int.MaxValue, x =>
  12.             {
  13.                 WebClient wc = new WebClient();
  14.                
  15.                 //wc.DownloadStringCompleted += Wc_DownloadStringCompleted;
  16.                
  17.                 Task.Run(() =>
  18.                 {
  19.                     wc.DownloadString("https://mango.buzzfeed.com/polls/service/editorial/post?poll_id=9673976&result_id=1&callback=__jsonp_1");
  20.                 });
  21.                
  22.                 count++;
  23.  
  24.                 Console.WriteLine(string.Concat("Vote Count:  ", count));                
  25.             });
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement