The issue is, every entry in my list becomes a copy of the entry that was just added.
So basically, if I end up with 10 objects in my list (10 lines in the text file), all 10 objects in the list will become a copy of the 10th object. This is true at any point during the loop, if I stop on the 6th iteration, all 5 previous entries will now be a copy of the 6th line I am adding.. this is my loop:
StreamReader lolz = new StreamReader("test.txt");
while (!lolz.EndOfStream)
{
string line = lolz.ReadLine();
string[] lines = line.Split('|');
{
tasksList.Add(new TaskList(lines[0], lines[1], lines[2], lines[3], lines[4], lines[5], lines[6]));
}
}
Makes 0 sense to me.