Chcę zrobić "bota", który wchodzi na stronę określoną ilość razy.
Nie wiem czemu ale, pętla wykonuje mi się tylko 2 razy (0, 1).
Z pętelką for jest wszystko raczej ok, bo jak wywalę
HttpWebResponse response = (HttpWebResponse)WebRequest.Create("http://mojastrona.pl").GetResponse();
to pętla działa prawidłowo.
W czym jest problem ?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace uploadtest
{
class Program
{
static void Main(string[] args)
{
for (int i = 0; i < 50; i++)
{
HttpWebResponse response = (HttpWebResponse)WebRequest.Create("http://mojastrona.pl").GetResponse();
Console.WriteLine(i);
Thread.Sleep(100);
}
}
}
}