更新:2007 年 11 月
错误消息
不能在变量声明中指定数组大小(请尝试使用“new”表达式初始化)将大小指定为数组声明的一部分时会发生此错误。若要解决此错误,请使用
下面的示例生成 CS0270:
// CS0270.cs
// compile with: /t:module
public class Test
{
int[10] a; // CS0270
// To resolve, use the following line instaead:
// int[] a = new int[10];
} | |