I just want get a 2 dimension array of List in c#. In my thought, below should works but it didn’t, the 1 dimension array of List works. I use Unity3D with Mono, however I think it’s language related problem.
List<MyType>[,] twoDArrayofList;//don't work, it's type is List<MyType>
List<MyType>[] oneDArrayofList;//it's works, the type is List<MyType>
Anyone know what’s wrong? Thank you.
What do you mean by “doesn’t work”? What error are you getting?
I don’t know about Mono (or Unity3D), but I just tried the following in a .NET project and got the results I expected: