hi, In C#, i have created ArrayList using structures. so it creates multi dimensional array list.
public struct ParameterValues { public ArrayList al; };
ArrayList alCombined = new ArrayList();
for(int i=0; i < CONDITION , i++) alCombined.Add(obj.pValue.al);
The dimension of ArrayList alCombined depends on the CONDITION. if its 1, then 1-D arraylist is created. Else multidimensional Arraylist is getting created.
Now in order to access the elements of alCombined, i'm typecasting it and accessing. like, (((ArrayList)al[i])[j])
But if its a 1-D arraylist then error occurs as type casting to Arraylist is not possible.
So I need a solution for this, or how to find if its a single/ multi dimensional arraylist. FYI: it should not depend on CONDITION variable. like if d condition is more than one, then it will be multi dimensional for sure.
Thanks in advance.