Most voted "enumerable" questions
9 questions
Sort by count of
-
63
votes3
answers24262
viewsWhat is the difference between Ienumerable, Iqueryable and List?
What’s the difference between Ienumerable, Iqueryable and List no . NET? When it’s best to use one or the other? Why does Resharper suggest that I modify the return of that function, for example,…
-
9
votes2
answers4792
viewsWhat is Yenumerable and Yenumerator for?
I made a combo of questions about IEnumerable and IEnumerator not only to help me but to help everyone who needs a more didactic explanation. Question 1 Could someone explain in a more didactic way…
-
8
votes2
answers576
viewsNotice: "Possible Multiple enumeration of Ienumerable"
I was doing some operations where I use collections. In one of these I needed to take a break (range) of numbers and I did the following: var range = Enumerable.Range(0, 4); And then I tried to do…
-
5
votes1
answer216
viewsYield does not return data
When calling the method, an HTML component enumerable should be returned. I’m using the HTML Agility Pack to read an HTML file. The same method works as expected when removing the yield and add…
-
4
votes1
answer122
viewsWhy does Arrays implement Ienumerable but not Ienumerable<T>?
I was making a class that contains an Array of the class Episode: public Episode[] EpisodesList; Then I implemented the IEnumerable<T> in my class. And as expected, I implemented the method…
-
4
votes2
answers621
viewsEntityframework . Asenumerable() or . Tolist()?
In one of the projects I picked up I saw the following code, which implements a data listing method of a given entity, but this listing is used only for reading: /// <summary> /// Listar todas…
-
2
votes1
answer285
viewsC# How to rename MANY files faster or at the same time?
So guys, I’m creating here a program to rename files, the code I’ve made is very slow and only renames one file at a time, and I can’t create a code to rename all at once because they’re different…
-
1
votes1
answer38
viewsI cannot create an iterator class with Ienumerable<T>
I’m creating an iterator class - has support for foreach - implementing the interface IEnumerable<T> package System.Collections.Generic, as in the code below: public class MyList<T> :…
-
0
votes2
answers154
viewsWhy . all in an empty list returns true?
I was having an error in a business rule, and when investigating, I arrived at the following code snippet, the intention of which is to verify that all the processes on a list are active: return…