Originally Posted by
RaleTheBlade
You could create a structure called "HighScore" that contains two things, the name and the score, then create a generic List<T> of those structures, load the contents of the highscores file into that list at bootup and then whenever a new high score is made, create a new HighScore structure, call List<T>.RemoveAt(0) (assuming the list has at least 1 score in it) and then add the new HighScore structure to the list using List<T>.Add(). Then when the user closes the application, save each HighScore structure to the file using a for each loop and a StreamWriter.