Why ThreadStart?

ajeeshco

Well-known member
Joined
Sep 19, 2006
Messages
257
Location
Cochin, India
Programming Experience
3-5
Hi,
I would like to know what is the use of ThreadStart in vb.net. I could create a thread by using the Thread Class itself and it worked just fine then why ThreadStart?

Thanks in advance
 
Last edited:
ThreadStart is a delegate. VB.NET hides the use of the ThreadStart delegate from you by allowing you to simply specify the AddressOf a method, but behind the scenes a ThreadStart delegate is created and the method reference you created is passed to it. This is much like the AddHandler statement hides the creation of an EventHandler delegate, but one is still created behind the scenes. These are examples of how VB.NET is trying to maintain VB's reputation as a language that is easy to use.
 
Back
Top