編譯器錯誤 CS0611
更新:2007 年 11 月
錯誤訊息
陣列元素不能為型別 'type'
某些型別不可當成陣列的型別。這些型別包含 System.TypedReference 和 System.ArgIterator。
下列範例使用 System.TypedReference 當成陣列元素,因而產生 CS0611:
// CS0611.cs
public class a
{
public static void Main()
{
System.TypedReference[] ao = new System.TypedReference [10]; // CS0611
// try the following line instead
// int[] ao = new int[10];
}
}