I am calling a function using parameterised thread
ParameterizedThreadStart ts = delegate(object o) { ProcessDBThread(strDBName, dicMsg, objQueueItem.RunID); };
Hence the ts variable should logically contain all 3 parameters that I am passing, but it is only holding one parameter.
The above code is inside a loop hence the rest two parameter gets overridden by the latest value. As a result all the Parameterized Thread contains different dicMsg
but same strDBName
. In reality strDBName
is different for every case.
I have checked the ts value in quick watch; ((System.Delegate)(ts)).Target
Here the Target
contains only one parameter, where it should have been three.
Just point me out where I might have been gone wrong!!