Showing posts with label AddressOf. Show all posts
Showing posts with label AddressOf. Show all posts

Tuesday, 27 December 2011

DotNet Frequently Asked Questions on Threading

What does AddressOf operator do in background ?


The AddressOf operator creates a delegate object to the BackgroundProcess method. A delegate within VB.NET is a type-safe, object-oriented function pointer. After the thread has been instantiated, you begin the execution of the code by calling the Start() method of the thread.

How can you reference current thread of the method ?


"Thread.CurrentThread" refers to the current thread running in the method."CurrentThread" is a public static property.

What's Thread.Sleep() in threading ?


Thread's execution can be paused by calling the Thread.Sleep