1
我有下面的类:LINQ的选择嵌套行
public class PingtreeTier
{
public BuyerType BuyerType { get; set; }
public int ID { get; set; }
public int MaxRequests { get; set; }
public IEnumerable<PingtreeNode> Nodes { get; set; }
public int Seq { get; set; }
public int Timeout { get; set; }
public bool Weighted { get; set; }
}
正如你可以看到PingtreeTier包含IEnumerable<PingtreeNode>
类。这个PingtreeNode类有一个名为Status的属性。使用Linq,我只需要选择PingtreeNode Status ='Active'的层级/节点。
任何人都可以帮忙,因为我在为这个语法而努力。