Top "Ienumerable" questions

IEnumerable, and its generic counterpart IEnumerable<T> are .NET interfaces for iterating (or enumerating) through a collection of items.

How to access index in IEnumerable object in C#?

I have an IEnumerable object. I would like to access based on index for instance: for(i=0; i<=Model.…

c# ienumerable
C# List<> GroupBy 2 Values

I'm using C# on Framework 3.5. I'm looking to quickly group a Generic List<> by two properties. For the …

c# linq list ienumerable group-by
How to loop through IEnumerable in batches

I am developing a c# program which has an "IEnumerable users" that stores the ids of 4 million users. I need …

c# ienumerable
Check if one IEnumerable contains all elements of another IEnumerable

What is the fastest way to determine if one IEnumerable contains all the elements of another IEnumerable when comparing a …

c# .net linq ienumerable
Is it possible to do start iterating from an element other than the first using foreach?

I'm thinking about implementing IEnumerable for my custom collection (a tree) so I can use foreach to traverse my tree. …

c# iterator ienumerable
How to update an element with a List using LINQ and C#

I have a list of objects and I'd like to update a particular member variable within one of the objects. …

c# .net linq ienumerable linq-to-objects
How to convert IEnumerable<string> to one comma separated string?

Say that for debugging purposes, I want to quickly get the contents of an IEnumerable into one-line string with each …

c# string linq collections ienumerable
IList vs IEnumerable for Collections on Entities

When I have entities in my domain with lists of things, should they be exposed as ILists or IEnumerables? E.…

collections ienumerable ilist
Using IEnumerable without foreach loop

I've gotta be missing something simple here. Take the following code: public IEnumerable<int> getInt(){ for(int i = 0; …

c# ienumerable yield-return
Pass a lambda expression in place of IComparer or IEqualityComparer or any single-method interface?

I happened to have seen some code where this guy passed a lambda expression to a ArrayList.Sort(IComparer here) …

linq extension-methods ienumerable iequalitycomparer icomparer