I am translating an old VC++ code to C#. In the C++ program, I have a three dimensional array, with the third dimension specified at run-time,
int * init_ltr [26][28];
int init_ltr_size = x; // gets assigned to something
// array allocated and initialized
for (i=0; i < 26; i++)
for (j=0; j < 28; j++)
init_ltr[i][j] = new int [init_ltr_size];
I can then reference items later like:
init_ltr[firstchar-'a'][secchar-'a'][ix] = wordnum;
How do I do this in C#? I tried declaring it as int [] init_ltr [26][28] but the compiler didn't like that. If possible, I would like to retain a three-dimensional array (instead of using lists or something else) so I don't have to go and change tons of my code.
Listwith itsItemproperty allows for[ ]shorthand so no code change is required