编译器错误 CS1637
更新:2007 年 11 月
错误消息
迭代器不能有不安全的参数或 yield 类型
检查迭代器的参数列表和任何 yield 语句的类型以验证您没有使用任何不安全的类型。
示例
下面的示例生成 CS1637:
// CS1637.cs
// compile with: /unsafe
using System.Collections;
public unsafe class C
{
public IEnumerator Iterator1(int* p) // CS1637
{
yield return null;
}
}