开发者

Methods returning/accepting IEnumerable [duplicate]

开发者 https://www.devze.com 2023-04-04 04:34 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: Can anyone explain IEnumerable and IEnumerator to me?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Can anyone explain IEnumerable and IEnumerator to me?

what is IEnumerable in .net

I'm very confused on this IEnumerable thing.

What does it mean when method returns IEnumerable/IEnumerable<T> or when it's used as a parameter? My guess is that it can return/accept any (generic)collection type, which we can use later in foreach loops, no?

And what makes me even more confused is that it's an interface开发者_如何学编程.

Not sure what makes me so confused, but I really feel stupid about it.

0

精彩评论

暂无评论...
验证码 换一张
取 消