- Home /
Change value of ArrayList inside another ArrayList
Hello, I'm a novice programmer and try to use a c# ArrayList in Unity. The problem is how can I change the value of ArrayList inside another ArrayList?
for example
ArrayList outsideList = new ArrayList(); ArrayList insideList = new ArrayList();
insideList.Add("item1"); insideList.Add("item2");
outsideList.Add(insideList);
outsideList[0] -- > insideList[0] = "item3";???
Comment
Answer by revolute · May 22, 2015 at 05:43 AM
It is easier, faster to use List, but nonetheless, the answers goes :
((ArrayList)outsideList[0])[0] = "item 3";
Please take my apology for a delay response, thank you for your answer, I'm using List ins$$anonymous$$d now :D
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
create a dynamic menu 1 Answer