Is there a shortcut to call a method on every element in a list/array or do you have to perform a loop and call each time?

  • Thread starter Thread starter T Gregory
  • Start date Start date
T

T Gregory

Guest
Basically, instead of doing this...

for (int i = 0; i < MyList.Count; i++) {

MyList.MyMethod();

}




Is there a way to do this? (I know the following won't work but something along those lines.)

MyList.MyMethod();

Continue reading...
 
Back
Top