What's faster iterating throught a list<T> or Ienumerable<T>

  • Thread starter Thread starter SalahChafai
  • Start date Start date
S

SalahChafai

Guest
is it better to use foreach on a list<T> or an Ienumerable<T>, i have the collection as Ienumerable so to make it a list i'll actually have to convert it, i'll only loop through the collection once so what's faster looping through the Ienumerable as is once or converting it to a list and then looping through it once

Continue reading...
 
Back
Top