0

Possible Duplicate:
Why use “new DelegateType(Delegate)”?

Just wanted to know the difference between Thread thread1 = new Thread(new ThreadStart(ThreadFunction)); and Thread thread1 = new Thread(ThreadFunction);? Any ideas please???

Edited: When i invoke the same thread function using two threads then is the function is working as a copy for one thread or the both threads use the same function?

Community
  • 1
  • 1
shujaat
  • 43
  • 5
  • 1
    Only different syntax. Also you have `Thread thread1 = new Thread(() => ThreadFunction());` an `Action` invoking your ThreadFunction – L.B Dec 02 '12 at 18:15
  • Please any body answer the edited part of my question! by the way, thanks @L.B for answering/clarifying the first part. – shujaat Dec 02 '12 at 18:37
  • 1
    The behaviour of the two things listed is identical. Usually the important thing is: including a different state parameter for the thread's configuration / parameters – Marc Gravell Dec 02 '12 at 18:45
  • Please answer edited part of the question!!! – shujaat Dec 02 '12 at 19:46
  • Not quite sure what you mean, but the same function will execute with different local data. – AJ. Dec 02 '12 at 19:51
  • @shujaat: Both threads use the same function. – Jim Mischel Dec 02 '12 at 20:08

0 Answers0