Reputation: 15282
I have the following:
public class Foo
{
public int x { get; set; }
}
public class Bar
{
public void DoWork(IEnumerable<Foo> foos)
{
var enumOfX = ?;
//Other code that uses enumOfX
}
}
How can I create an IEnumerable<int>
of all the x's?
Upvotes: 4
Views: 217