FindAll vs Where extension-method

后端 未结 5 1036
旧巷少年郎
旧巷少年郎 2020-11-30 04:25

I just want know if a \"FindAll\" will be faster than a \"Where\" extentionMethod and why?

Example :

myList.FindAll(item=> item.category == 5);
         


        
5条回答
  •  伪装坚强ぢ
    2020-11-30 05:12

    I can give some clue, but not sure which one faster. FindAll() is executed right away. Where() is defferred executed.

提交回复
热议问题