Category "ienumerable"

What does "object is enumerated" mean in C#?

I've been reading lately articles and documentation about deferred execution, LINQ, querying in general etc. and the phrase "object is enumerated" came up quite

Adding objects to IEnumerable

Im making a basic CSV Reader. Im sepparating the header from the contents using header and data. Now, my lists contain data of the type person.: public

How does the behavior of .Take() changes based on the interface reference I'm using on left. IQueryable vs IEnumerable

Assume I've these sample codes IQueryable<Employee> data = context.Employees.Where(x => x.FullName != "Shekar Reddy"); var topE

Performance between Iterating through IEnumerable<T> and List<T>

Today, I faced a problem with performance while iterating through a list of items. After done some diagnostic, I finally figured out the reason which slowed dow

Why can't I assign List<int> to IEnumerable<object> in .NET 4.0

I try to do this: IEnumerable<object> ids = new List<string>() { "0001", "0002", "0003" }; it works great! But when I try to do this: IEnumerab

Return SqlDataReader with closed connection

I have created a Sql helper class which handles most of my needs. Amongst those, I have a function which executes a SQL statement and returns a SqlDataReader a

IEnumerable vs List - What to Use? How do they work?

I have some doubts over how Enumerators work, and LINQ. Consider these two simple selects: List<Animal> sel = (from animal in Animals

Union two list by property

I would like to merge two list without duplicates. It should distinct only by one property. I have a class: public class Test { public int Id { get; set;

How can I return an empty IEnumerable?

Given the following code and the suggestions given in this question, I've decided to modify this original method and ask if there are any values in the IEnumara