c# - How to use Parallel.ForEach with dataTable -


this question has answer here:

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

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -