gpt4 book ai didi

c# - 如何从 IGrouping 中获取值?

转载 作者:太空狗 更新时间:2023-10-30 00:10:41 28 4
gpt4 key购买 nike

我已经在列表上应用了 IGrouping<> - 它看起来像这样:

IEnumerable<IGrouping<TierRequest,PingtreeNode>> Tiers
{
get { return ActiveNodes.GroupBy(x => new TierRequest(x.TierID, x.TierTimeout, x.TierMaxRequests)); }
}

稍后在我的代码中,我迭代了层。使用 Key 元素获取关键数据很简单,但是如何获取 IEnumerable<PingtreeNode>构成值的部分?

提前致谢

最佳答案

Tiers.Select(group => group.Select(element => ...));

关于c# - 如何从 IGrouping 中获取值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20073445/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com