我的以下代码有编译错误,
错误1无法将类型'TestArray1.Foo [ ,,*]' 隐式转换为'TestArray1.Foo [] [] []'C:\ Users\lma\Documents\Visual Studio 2008\Projects\TestArray1\TestArray1\Program.cs 17 30 TestArray1
有没有人有任何想法?这是我的整个代码,我使用的是VSTS 2008 + Vista 64位.
namespace TestArray1
{
class Foo
{
}
class Program
{
static void Main(string[] args)
{
Foo[][][] foos = new Foo[1, 1, 1];
return;
}
}
}
Run Code Online (Sandbox Code Playgroud)
编辑:版本2.我有另一个版本的代码,但仍然有编译错误.有任何想法吗?
Error 1 Invalid rank specifier: expected ',' or ']' C:\Users\lma\Documents\Visual Studio 2008\Projects\TestArray1\TestArray1\Program.cs 17 41 TestArray1
Error 2 Invalid rank specifier: expected ',' or ']' C:\Users\lma\Documents\Visual Studio 2008\Projects\TestArray1\TestArray1\Program.cs 17 44 TestArray1
namespace TestArray1
{ …Run Code Online (Sandbox Code Playgroud)