ThreadPool.QueueUserWorkItem Method (WaitCallback)
Queues a method for execution. The method executes when a thread pool thread becomes available.
Assembly: mscorlib (in mscorlib.dll)
You can place data required by the queued method in the instance fields of the class in which the method is defined, or you can use the QueueUserWorkItem(WaitCallback, Object) overload that accepts an object containing the necessary data.
The following example uses the ThreadProc method, to execute when a thread becomes available. No task information is supplied with this overload. Therefore, the information that is available to the ThreadProc method is limited to the object the method belongs to.method overload to queue a task, which is represented by the
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0