I have some application that passes a string parameter to a method that is invoked using a thread inside a loop like this, this thread is create 50 times
Thread t = new Thread(new ThreadStart(() =>
{
StartExtraction( savedFileName);
}));
t.Name = "do";
t.Start();
in the StartExtraction method I noticed that the parameters are overwritten , I mean if the first invocation was with savedFileName="abc" and the second was with savedFilename="xyz" ,the method always processes "xyz", I mean StartExtraction when debugged, the parameter is overwritten, , why?