如何选择使用IEnumerable, ICollection, IList

● 如果只想遍历集合,使用IEnumerable, IEnumerable<T>
● 如果想遍历、修改集合,以及需要延迟加载的导航属性,使用ICollection, ICollection<T>
● 如果想遍历、修改、添加、清空、使用索引,使用IList, IList<T>

原文地址:https://www.cnblogs.com/huangj/p/8989728.html