I'm trying to remove last two lines from list, with text document I did it this way:
var lines = System.IO.File.ReadAllLines(doc.txt);
System.IO.File.WriteAllLines(doc.txt, lines.Take(lines.Length - 2).ToArray());
but when I'm trying to do the same with list
List<string> myList = new List<string>();
this way, I have not result:
myList.RemoveAt(myList.Count - 2);