Why does ICollection implement both IEnumerable and IEnumerable

前端 未结 3 1800
深忆病人
深忆病人 2021-01-13 03:37

Why does ICollection implement both IEnumerable and IEnumerable?

What is the purpose of this? How does

3条回答
  •  执笔经年
    2021-01-13 04:08

    IEnumerable inherits IEnumerable so it makes sense for ICollection to as well. It's just stating explicitly the inheritance that would be there anyway.

提交回复
热议问题