|
I'm trying to use a multidimensional array of structs in C#. After some time I have managed to write a single row array without fixed length. The code is as follows: I can access the structs' properties easily by doing something like My question is, how can I define a new multidimensional array of structs of fixed length (say [2,3]) and how could I access it later on? Every single thing I've tried returns an error. Thanks
(comments are locked)
|
|
C# documentation about multidimensional arrays: http://msdn.microsoft.com/en-us/library/2yd9wwz4%28v=vs.100%29.aspx Thanks Nicolas Musset. I don't know why it refused to compile before, but I can write a second row now. It still returns an error when I try to specify its length, though.
May 15 '12 at 03:13 PM
Agemoi
Could you show us the line that is causing the error?
May 15 '12 at 03:59 PM
Kryptos
(comments are locked)
|
|
Finally got it to work. I'm sorry for wasting your time. In case anyone else encounters a similar problem it looks like this: You would have had to set the struct with the constructor inside first. Thanks everyone
(comments are locked)
|
