Call Us Today! +91 8069195500 | +1 (302) 520-2820|sales@codestoresolutions.com

IEnumerable

It issued countless delays in the query’s use until the code release or a value type. Basically, Ienumerables has a way of finding the next item in the collection, so it looks at things “once in a while”, does not require the complete collection to be in memory, and does not know how many items it contains. , the foreach just keeps getting the next thing until it’s over.

Ienumerable also helps ensure consistency, as you always ask the source for no unintended side effects. Lists and arrays create objects in memory and allow access to multiple paths associated with those types (List | Lists). Lists and Arrays know how many items are in the collection and have extra approval for your entire building.

Where you can use Ienumerable

With an extensive database, you do not want to copy everything in memory and cause performance problems in your application. Where you can use List or List: You need results immediately and may change the structure you are asking for overtime. Important findings IEnumerable is read-only, and the list is not available.

Countless species have a way of finding the next item in the collection. They do not need the complete collection to be memorized and do not know how many items they have in it, because each one keeps getting the next item until it ends.

Go to Top