Hi,
I have code like below for Parallel for loop:
int count = 0;Parallel.For(0, dsCsv.Tables[0].Rows.Count, rowCount => {
count = 0;
if (ds.Tables[0].Rows[rowCount]["Test"].ToString() != String.Empty) {
// Do nothing.
//continue;
}else {
Parallel.For(0, dtFromDB.Rows.Count, nextRowCount => {
if(count == 0){
}
});
});
I am facing issue with count. When inside loop iterates around 300 plus record and outside loop iterates around 10 somehow count is getting changed because of that getting wrong result. Can you please help me is there any alternative for this to approach same count logic inside parallel loop.
Thanks....