khalil-213
New Member
I have been fooling around with 2D arrays, but I don't believe a 2D array can inherits the properties like INDEXOF, ADD, and others from the arraylist class. Can anyone tell me definitively if this is true? If you can how would I do it.That's because the Array and the ArrayList are two different classes. An array is designed to be fixed length so there is no .Add method.<BR><BR>What you can do is substitue an ArrayList where you are currently using an Array. Or you can create an ArrayList using the ArrayList(ICollection) constructor:<BR><BR>ArrayList arr = new ArrayList(arrayInstance);<BR><BR><BR>Maybe check out the other classes in System.Collections also and you might find one better suited to your task.<BR><BR>Hope this helps,<BR>shaiThat gets you the functionality of an ArrayList for the "outer array" yet allows the convenience and predictability of simple arrays for the "inner arrays".<BR><BR>