|
-
February 19th, 2011, 10:11 AM
#1
QueueUserWorkItem
It appears I can also call QueueUserWorkItem without a WaitCallBack constructor in the parameter list ...
Code:
static void Main(string[] args)
{
ThreadPool.QueueUserWorkItem(ThreadMethod);
Console.ReadKey();
}
static void ThreadMethod(Object objInfo)
{
Console.WriteLine("This is the threaded method.");
}
MSDN however states this is only allowed in VB ... http://msdn.microsoft.com/en-us/libr....90).aspx#Y108
Can anyone tell me which is preferred in C# ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|