【问题标题】:Which name space is the Iterator class in?Iterator 类在哪个命名空间中?
【发布时间】:2019-11-14 15:54:05
【问题描述】:

source codeSystem.Linq.Enumerable.Where 方法中,在第 25 行有以下内容:

if (source is Iterator<TSource> iterator)

我找不到Iterator 的类是什么。它在哪个命名空间中?

【问题讨论】:

  • 这是一个嵌套在类Enumerable中的内部抽象类。
  • Iterator.cs 与该文件位于同一目录中。

标签: c# linq ienumerable


【解决方案1】:

使用 https://source.dot.net 浏览 .NET Core 源代码(使用 https://referencesource.microsoft.com 浏览 .NET Framework 源代码)。

你的方法is here。您可以单击Iterator&lt;T&gt;,它会将您带到here,在System/Linq/Iterator.cs,在System.Linq 命名空间中。这是Enumerable使用的内部类型。

【讨论】:

    猜你喜欢
    • 2011-03-18
    • 2020-07-16
    • 2015-07-13
    • 1970-01-01
    • 2015-05-31
    • 2012-01-25
    • 2012-05-27
    • 2011-01-29
    • 2011-02-10
    相关资源
    最近更新 更多