static void RunBugReportService () { for (int i = 0; i < iterationsPerThread; i++) { try { using (BugReportService service = new BugReportService ()) { service.Connect ("google.com", 80); } } catch (Exception ex) { Console.WriteLine (ex.ToString ()); errorCount++; } } }