G
Guest
Hello, Newsgroupians:
I have a question regarding rectangular arrays. Suppose I am trying to
create a rectangular array of type System.Object. Each item in the
rectangular array may be an integer, a double, or a string. However, until
runtime, the array items are not known, so it will be a form of late binding.
What's the best way to create such a rectangular array? The way I can
picture it is as follows...
// For simplicity, assume the array to be 3x3.
object[,] arr = new object[3,3];
arr[0, 0] = 6;
arr[0, 1] = 2.5
arr[0, 2] = "Hello, World";
arr[1, 0] = "Jones";
arr[1, 1] = 36.3";
arr[1, 2] = "Hello, again";
....
Is this the proper way, or should I use an ArrayList that contains an
multitude of ArrayLists? Or is there a better approach I should be taking?
Thank you.
Trecius
I have a question regarding rectangular arrays. Suppose I am trying to
create a rectangular array of type System.Object. Each item in the
rectangular array may be an integer, a double, or a string. However, until
runtime, the array items are not known, so it will be a form of late binding.
What's the best way to create such a rectangular array? The way I can
picture it is as follows...
// For simplicity, assume the array to be 3x3.
object[,] arr = new object[3,3];
arr[0, 0] = 6;
arr[0, 1] = 2.5
arr[0, 2] = "Hello, World";
arr[1, 0] = "Jones";
arr[1, 1] = 36.3";
arr[1, 2] = "Hello, again";
....
Is this the proper way, or should I use an ArrayList that contains an
multitude of ArrayLists? Or is there a better approach I should be taking?
Thank you.
Trecius