This is how I did it.
Thread is in the namespace System.Threading
{
Thread newThread = new Thread(new ParameterizedThreadStart([MethodName]);
newThread.Start([parameter]);
}
[MethodName](object [parameter])
{
// do something
}
So, the key is making the parameter object type. In the method that you created a new thread, convert the object into the datatype that it is.
No comments:
Post a Comment