Return collection object of LINQ

  • Thread starter Thread starter Curious
  • Start date Start date
C

Curious

After I run LINQ on a collection with a filter, I get a subset,
IEnumerable<>. Is this a list with copied items from the original
collection, or is it a list containing just pointers to the original
items in the original list?

Thanks,
 
After I run LINQ on a collection with a filter, I get a subset,
IEnumerable<>. Is this a list with copied items from the original
collection, or is it a list containing just pointers to the original
items in the original list?

Thanks,

If the collection contain reference types - the subset will contain
references to the original items, for value types - the copies.
 
Back
Top