Return collection object of LINQ

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,
 
S

S2Ler

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top