• i want a multithread examplw without console applicaton and how to use thread.sleep method program should be in
    • Moved by Larcolais Gong Monday, August 30, 2010 6:51 AM (From:.NET Framework Setup)
    Friday, August 27, 2010 4:38 AM


All replies

  • can't understand ex without console application. any way see the example below
    using System;
    using System.Threading;
    class Test
      int waitTime = 1000;
      public static void Main() 
        Thread newThread = new Thread(new ThreadStart(Work));
        if(newThread.Join(waitTime + waitTime))
          Console.WriteLine("New thread terminated.");
          Console.WriteLine("Join timed out.");
      static void Work()


    Manish Sati
    Friday, August 27, 2010 4:49 AM
  • Hi mohittiwari,

    As your concern, it seems that your concerns might be related with C# development.

    I will moving this thread to C# General Forum.

    You will get more helpful suggestions there.

    Best Regards

    Larcolais Gong

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, August 30, 2010 6:49 AM
  • Hi,

    What i suggest is to use

    using System.Threading;

    and use the below code where ever u want to have a thread...

    Thread newThread = new Thread(new ThreadStart(name of the procedure u want to run as thread);

    The above code will start your thread procedure.

    You can have a look in the below for more details:



    Monday, August 30, 2010 9:03 AM