Hi there,
Basically I am a bit confusing about multithreading...I have created this class ThreadJob that holds the work that every thread has to do, which basically is copying files from one directory to another. I try to create different threads as follows :class Program
{
}
class
iJobId = jobId;
szFromPath = fromPath;
szToPath = toPath;
iThreadId = iId;
bDone =
iId++;
public int ThreadId
get { return (iThreadId); }
public Boolean Done
get { return (bDone); }
public String Error
get { return (szError); }
public void Start()
//Do the copying
fi.CopyTo(dup);
szError +=
bError =
fi.Delete();
My question is ...how can i create several threads which will be doing the same thing, the only difference will be that the arguments for one thread will be diferrent to the other.
Any help will be highly appreciate.
Cheers
PS: How can i have threads accessing the same method!? Am I suppose to create as many methods as threads - this will be unlikely, right? :( ...