IEnumerable vs T[]

前端 未结 7 1311
天命终不由人
天命终不由人 2021-01-07 20:43

I just realize that maybe I was mistaken all the time in exposing T[] to my views, instead of IEnumerable.

Usually, for this kind

7条回答
  •  情歌与酒
    2021-01-07 21:03

    Your gut feeling is correct, if all the view cares about, or should care about, is having an enumerable, that's all it should demand in its interfaces.

提交回复
热议问题