Say I have simple LINQ extenstion:
var filtered = data.Where(i => i.Count > 0);
I know that this will not evaluated unless I start to use filtered i.e.
foreach(DataItem i in filtered) ...
However I need to create cloned version of data
and release data as soon as possible. data
can be changed in other thread so I want to get immediate snapshot of it.
How can I force filtered
to be evaluated immediately?