gpt4 book ai didi

c# - 从 List 中取出一组 5 个字符串

转载 作者:太空狗 更新时间:2023-10-29 20:47:24 26 4
gpt4 key购买 nike

<分区>

我有一个 List<string>我想从中取出 5 件元素。没有键或任何简单的分组依据...但它将始终是 5 的倍数。

例如

{"A","16","49","FRED","AD","17","17","17","FRED","8","B","22","22","107","64"}

分组:

"A","16","49","FRED","AD"
"17","17","17","FRED","8"
"B","22","22","107","64"

但我想不出一个简单的方法来做到这一点!

很确定它可以通过枚举和 Take(5) 来完成...

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