Friday, January 8, 2010

What is the best way to add items from an Array into ArrayList?

Use AddRange method of the ArrayList.


string[] arr = new string[] { "ram", "shyam", "mohan" };

ArrayList arrList = new ArrayList();

arrList.AddRange(arr);

No comments:

Post a Comment