Web2 mei 2012 · No, it is not, because you may have intrinsic order. You give SQL as example - the result is an IEnumerable, but if I have enforced ordering before (By using OrderBy ()) then the IEnumerable is ordered per definition of LINQ. AsEnumerable ().First () gets me then the first item by Order. Share. Webadd a new API for .NET Core only, returning an appropriate async-enumerable type; completely smash the existing API as a breaking change (a "major" etc), changing it to return an async-enumerable type; We'll probably go with "1", but I have to say, the second option is unusually tempting, for good reasons:
C#: Get the element type of an enumerable through reflection
WebOne important aspect seems to be missing from the answers so far: When an IEnumerable is returned to the caller, they must consider the possibility that the returned object is a "lazy stream", e.g. a collection built with "yield return". That is, the performance penalty for producing the elements of the IEnumerable may have to be … Web1 mei 2016 · Returning interfaces (in this case IEnumerable) or accepting them is one core approach in Object Oriented Programming. This mixes three of the core principles of … trucks with lift kits and big tires
What To Return: IEnumerable or IList? - DaedTech
WebIList is probably simpler to describe. It’s a collection (I can use this because it inherits from ICollection) of objects that can be accessed via indexers, iterated over and (usually) … Webadd a new API for .NET Core only, returning an appropriate async-enumerable type; completely smash the existing API as a breaking change (a "major" etc), changing it to … trucks with plow for sale