gpt4 book ai didi

c# - 数据表实现IEnumerable?

转载 作者:太空狗 更新时间:2023-10-29 23:10:02 25 4
gpt4 key购买 nike

图中:

enter image description here

AsEnumerable 方法如何知道类型应该是 DataRow

我在 Reflector 中搜索过,Datatable 确实实现了 IEnumerable..

AsEnumerable 代码是:

public static IEnumerable<TSource> AsEnumerable<TSource>(this IEnumerable<TSource> source)
{
return source;
}

我错过了什么?

最佳答案

您正在查看错误的 AsEnumerable 方法 - 您正在调用 DataTableExtensions.AsEnumerable .而不是 Enumerable.AsEnumerable .

关于c# - 数据表实现IEnumerable?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8787828/

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