|
Rather new to javascript, I am trying to create a two dimensional array and populate with a string that is it's space delineated location within the array. ie Array[2][2] would be "2 2". However I receive the compiler error BCE0024: The type 'String' does not have a visible constructor that matches the argument list '()'. What am I doing wrong?
(comments are locked)
|
This will do what you want:
But like Eric5h5 wisely points out, the c# multi-dimensional arrays are better anyways if they don't need to be resized.
(comments are locked)
|
|
Strings are structs and do not need to be initialized with new, and in fact cannot be. Unless the arrays need to be dynamically sized, however, it would be quite a lot faster to use this for actual 2D string arrays instead of using Arrays of Arrays. I was trying to avoid using the work around with making a separate c script, but you are right that it's probably the best way. Thanks.
Nov 09 '10 at 08:09 PM
Ben 18
(comments are locked)
|
