gpt4 book ai didi

c# - 将 LINQ 中的 IEnumerable 数据作为参数传递给方法

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

<分区>

Possible Duplicate:
How can I pass an anonymous type to a method?

我有以下 LINQ 语句,其输出必须在另一个方法中处理:

var data = from lines in File.ReadAllLines(TrainingDataFile)
.Skip(ContainsHeader ? 1 : 0)
let f = lines.Split(new[] { FieldSeparator }).ToList<String>()
let target = f[TargetVariablePositionZeroBased]
select new { F=f, T=target };

获取此数据的方法中参数的数据类型应该是什么?

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