編譯器錯誤 CS0610
更新:2007 年 11 月
錯誤訊息
欄位或屬性不能為型別 'type'
某些型別不可當做欄位或屬性 (Property) 使用。這些型別包含 System.ArgIterator 和 System.TypedReference。
下列範例使用 System.TypedReference 做為欄位,因而產生 CS0610:
// CS0610.cs
public class MainClass
{
System.TypedReference i; // CS0610
public static void Main ()
{
}
public static void Test(System.TypedReference i) // OK
{
}
}