I had this code:
String[] lineElements; . . . try { using (StreamReader sr = new StreamReader(\"TestFile.txt\")) {
string.Split() returns an array - you can convert it to a list using ToList():
string.Split()
ToList()
listStrLineElements = line.Split(',').ToList();
Note that you need to import System.Linq to access the .ToList() function.
System.Linq
.ToList()