c# - foreach statement count -


how count/number of execution of foreach statement?

for example if have statement this:

test.testmethod.foreach(x => x.testmethod2.add(test_arg)); 

i want know number of times add has run, number of x.

what's simplest way this?

there no foreach in linq. talking list<t> foreach. use count on list<t> number of items


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -