C#, a String's Split() method, how can I put the resulting string[] into an ArrayList or Stack?
You can initialize a List<T> with an array (or any other object that implements IEnumerable). You should prefer the strongly typed List<T> over ArrayList.
List<T>
IEnumerable
ArrayList
var myList = new List<string>(myString.Split(','));
2.1m questions
2.1m answers
60 comments
57.0k users