Hi
I´d like to know how to access the data from an arrayList which is inside another arrayList.
My question is , how could I print on screen or access the data from the second array, as per:Code://I create two arraylists. ArrayList myArray1 = new ArrayList(); ArrayList myArray2 = new ArrayList(); //Add data to myArray1 myArray1.Add("Array1string1"); myArray1.Add("Array1string2"); //Add data to myArray2. myArray2.Add("Array2String1"); //Add myArrayList2 to myArrayList1 myArray1.Add(myArray2);
Accessing data from index 0 and 1.
How would I access data from index 2 ? Which is in this case an arraylist.Code:myArray1[0].ToString() +"\n"; myArray1[1].ToString();
Thanks!




Reply With Quote