I'm using C# System.Collections.Generic List and the Add function works as expected but Append does nothing? Why is this? I feel like I'm missing something obvious but I can't see what, I use it the same as Add but it doesn't work?
List<string> x = new List<string>();
x.Add("hello");
foreach (string s in x) { Console.WriteLine(s); }
Console.WriteLine();
x.Add("hi");
foreach (string s in x) { Console.WriteLine(s); }
Console.WriteLine();
x.Append("oi");
foreach (string s in x) { Console.WriteLine(s); }
Console.WriteLine();
x.Append("aye");
foreach (string s in x) { Console.WriteLine(s); }
Console.WriteLine();
output:
hello
hello
hi
hello
hi
hello
hi