Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Look at this example of IEnumerable here:

1)class People implements Person[] _people;
2)class PeopleEnum also implements Person[] _people;

I see these two sets are the same. does it mean IEnumerable is costly?

What I have tried:

I think through this observation and want to get confirmation of my understanding from gurus here.
Posted
Updated 4-Feb-23 15:33pm
Comments
Graeme_Grant 4-Feb-23 21:32pm    
Please update your question with your code for proper context.
PIEBALDconsult 5-Feb-23 11:21am    
Would you like it to be? It can be if you want.

1 solution

No, it will not. IEnumerable[^] is the base interface for all non-generic collections that can be enumerated.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900