c# - How to use Parallel.ForEach with dataTable -
this question has answer here:
- parallel foreach on datatable 3 answers
how can use parallel.foreach datatable works fine list , array cant working datatable shows error "cannot inferred usage. try specifying type arguments explicitly"
parallel.foreach(dt.rows , row=> { //code here });
the answer need cast row asenumerable() extension method:
parallel.foreach(dt.rows.asenumerable() , row=> { //code here });
Comments
Post a Comment