Mistři v programování na #hovnokod

C# #4285

WebClient klyjent = new WebClient();
klyjent.Encoding = System.Text.Encoding.UTF8;
bool wrtd;
StreamWriter writer = File.AppendText(DateTime.Now.ToString("yyyyMMddHHmm") + ".txt");
for (;;)
{
    wrtd = false;
    try
    {
        hledany = klyjent.DownloadString("http://......php");
        ...
    }
    catch (System.Net.WebException)
    {
        Console.WriteLine("Network error");
        writer.WriteLine("Network error");
        wrtd = true;
    }
    catch (ArgumentOutOfRangeException)
    {
        Console.WriteLine("Vyjebaný O2 ADSL modem");
    }
    if (wrtd)
    {
        Console.WriteLine("at " + DateTime.Now + Environment.NewLine);
        writer.WriteLine("at " + DateTime.Now + Environment.NewLine);
        writer.Flush();
    }
    System.Threading.Thread.Sleep(10000);
}

Anonymous,