aBothe/Mono-D — Issue #2: variable MaxLength cannot be read at compile time (able to read actually)
Author: liyangsci
Created: 2011-12-22 14:03:13+00:00
State: open

I wanted to use a variable to define the max size of an array and create it later by "new" statement. But it didn't work!
Codes:
int MaxLength = 50;
char[MaxLength][] chAll = new char[MaxLength][MaxLength];

Error: variable MaxLength cannot be read at compile time (CodingRaster)

Now, I have to do as: char[50][] chAll = new char[50][50];