开发者

Convert For Each GridViewRow to Parallel.ForEach GridViewRow

I am trying to convert the code below into a parallel loop. What is the proper syntax to use Parallel.ForEach instead of just ForEach?

    For Each grow As GridViewRow In gvEmployees.Rows
        SendSu开发者_运维技巧mmaryReport(grow)
    Next


This is what I used to get it working:

 Parallel.ForEach(Of GridViewRow)(gvEmployees.Rows.OfType(Of GridViewRow)(), (AddressOf SendSummaryReport))


You will want to do

Parallel.ForEach(Of GridViewRows)(gbEmployees.Row, Function(grow) SendSummaryReport(grow))

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜