How to get an array of members of an array
Posted
by Mystere Man
on Stack Overflow
See other posts from Stack Overflow
or by Mystere Man
Published on 2010-06-10T06:07:15Z
Indexed on
2010/06/10
6:12 UTC
Read the original article
Hit count: 175
Suppose I have a class
public class Foo
{
public Bar { get; set; }
}
Then I have another class
public class Gloop
{
public List<Foo> Foos { get; set; }
}
What's the easiest way to get a List of Foo.Bars?
I'm using C# 4.0 and can use Linq if that is the best choice.
My first thought was something like
© Stack Overflow or respective owner