title: Why am I getting a TIMEOUT error, or an exception handler error?
body: <p>When I run this program it is suppose to ping each website 4 times and save the results (website and return time in milliseconds) in a .csv file. But I'm getting an exception handler or a timeout error. Can someone please help me?
  Here is what I have:</p>
  
  <pre><code>using System;
  using System.Collection.Generic;
  using System.IO;
  using System.Linq;
  using System.Net.NetworkInformation;
  using System.Text;
  using Threading.Teask;
  
  namespace PingApp
  {
      class Program
      {
          static void Main(string[] args)
          {
              List&lt;string&gt; lstWebSites = new List&lt;string&gt;();
              lstWebSites.Add("www.yahoo.com");
              lstWebSites.Add("www.att.com");
              lstWebSites.Add("www.verizon");
              string filename = @"PingLog.csv";
              {
                  using (var writer = new StreamWriter(filename, true)) 
                  {
                      foreach(string website in lstWebSites)
                      {
                          writer.WriteLine(website, lstWebSites);
                          try
                          {
                              Ping myPing = new Ping();
                              PingReply reply = myPing.Send(website, 1000);
                              if (reply != null)
                              {
                                  Console.WriteLine("{0}, {1}", reply.Address, reply.RoundtripTime);
                              }
                          }                   
                          catch
                          {
                              Console.WriteLine.("ERROR: You have some TIMEOUT issue");
                          }
                      }
                  }
              }
          }
      }
  }
  </code></pre>