Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.02 KB | None | 0 0
  1. using Connections;
  2. using ListEntities;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Configuration;
  6. using System.Diagnostics;
  7. using System.IO;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading;
  11. using System.Threading.Tasks;
  12. using System.Windows.Forms;
  13.  
  14. namespace ConsoleForTesting
  15. {    
  16.  
  17.     class Program
  18.     {
  19.         static String path = @"C:\Users\Martin\Projects\DBManager\DBMANAGER\web.config";        
  20.  
  21.         static void Main(string[] args)
  22.     {      
  23.             ConfigurationManager.RefreshSection("appSettings");
  24.  
  25.             for (int i = 1; i <= 100; i++)
  26.             {
  27.                 Thread t = new Thread(delegate() { WriteXML(i); });
  28.                 t.Start();
  29.  
  30.             }
  31.         }
  32.  
  33.         static void WriteXML(int id)
  34.         {
  35.             Console.WriteLine("ID " + id + " - START");
  36.             new XML_Action().InsertAction(DateTime.Now, "THREAD_TEST", "ID " + id, "INFO");
  37.             Console.WriteLine("ID " + id + " - END");
  38.         }    
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement