編譯器錯誤 CS1637
更新:2007 年 11 月
錯誤訊息
Iterator 不能有 Unsafe 參數或 yield 型別
檢查 Iterator 的引數清單及任何 yield 陳述式的型別,確認您沒有使用任何不安全的型別。
範例
下列範例會產生 CS1637:
// CS1637.cs
// compile with: /unsafe
using System.Collections;
public unsafe class C
{
public IEnumerator Iterator1(int* p) // CS1637
{
yield return null;
}
}