[英]LINQ: Creating an IEnumerable<T> from another IEnumerable<T>?
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?如何创建所有 x 的
IEnumerable<int>
?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.