What type of object is required when starting a thread that requires a single
parameter?
Interview question and answer by:
Rajni.Shekhar | Posted on: 4/19/2012 | Category:
C# Interview questions | Views: 1218 | |
Points: 40
Select from following answers:- ThreadStart delegate
- ParameterizedThreadStart delegate
 - SynchronizationContext class
- ExecutionContext class
When you start a thread that requires a single parameter use ParameterizedThreadStart delegate.
Example:
Thread t = new Thread (new ParameterizedThreadStart(MyFunc)); //myfun reqires to take an object type parameter.
static void MyFunc(object obj)
{
}
Show Correct Answer |
Asked In: Many Interviews
|
Alert Moderator
Found interesting? Add this to: