I\'m working with ArrayList in C# and I am wondering how I can add objects to an ArrayList and then retrieve the values from it?
ArrayList
In short,
Firstly, it is better to use a List, and not an ArrayList in C#. For instance, if you want a list of strings:
List myList = new List();
or
var myList = new List();
Then the methods will be similar, e.g.
myList.Add("bla"); var test = myList[0];