ok, here is an example: data is stored in xml and represents the table, need array list of array lists of xml nodes to do some intelligent sorting
ArrayList _arrMaster = new ArrayList
foreach(XmlNode rNode in XmlTable)
{
if(IsStartOfGroup(rNode)) //if we need to start up a group I need a new array list
{
ArrayList _arrSub = new ArrayList();
_arrSub.Add(rNode);
/*add few more xml nodes and then move to the next group */
_arrMaster.Add(_arrSub);
}
}
this is very simplified, but at the end you get:
ArrayList that holds multiple array lists that holds multiple xml nodes that should be grouped together for some reason.
to work this:
private void ReIndexMaster(ref ArrayList master)
{
int iRowCount = 1;
int iCellCount = 1;
foreach(ArrayList tmp in master)
{
foreach(XmlNode rNode in tmp)
{
rNode.Attributes["index"].Value = iRowCount.ToString();
rNode.Attributes["o_index"].Value = iRowCount.ToString();
iRowCount += 1;
iCellCount = 1;
foreach(XmlNode cNode in rNode)
{
cNode.Attributes["index"].Value = iCellCount.ToString();
iCellCount += 1;
}
}
}
}
So the answer - multi dimensional arrays are good for you and are possible. Remember ArrayList holds object and everything is an object (even collections like arraylsits)so there is no limit. I have simplified this example but using casting you can get to any element within a top or bottom level of your arraylist.
Paul