How to get IEnumerable <T1> of members of class T2 to Enumerable <T2> using Linq? (FROM#)
Suppose I have:
public class foobar
{
public int lorem;
public int ipsum;
}
IEnumerable<foobar> items = new List<foobar>();
items.add(new foobar(){lorem = 0, ipsum = 0};
items.add(new foobar(){lorem = 1, ipsum = 1};
How can I get IEnumerable from all "lorem" in "elements" using Linq?
+1
a source to share
2 answers