IEnumerable vs List - What to Use? How do they work?

后端 未结 10 2154
臣服心动
臣服心动 2020-11-22 03:57

I have some doubts over how Enumerators work, and LINQ. Consider these two simple selects:

List sel = (from animal in Animals 
                         


        
10条回答
  •  遥遥无期
    2020-11-22 04:25

    There is a very good article written by: Claudio Bernasconi's TechBlog here: When to use IEnumerable, ICollection, IList and List

    Here some basics points about scenarios and functions:

    enter image description here enter image description here

提交回复
热议问题