我想从集合中检索所有单个属性作为数组:
class Foo{
public string Bar { get; set; }
public string Baz { get; set;}
}
Run Code Online (Sandbox Code Playgroud)
我想从集合中获取所有Bar属性
var list = new List<Foo>();
string[] allBars = list. ....
Run Code Online (Sandbox Code Playgroud)
它是怎么回事?
谢谢你的帮助.