title: Add a highscore system that's saves the data
body: <p>I was wondering how I would go about creating a high score system. I've made a simple game with score's, but I want to have the highscores saved in a file, so when the application runs you can see the high score with the name.
  My code for the game so far, if needed:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  
  namespace Guess_the_number_1
  {
      public partial class Form1 : Form
      {
          int randomNumber;
          int score;
  
          Random random;
  
          public Form1()
          {
              InitializeComponent();
              random = new Random();
          }
  
          private void Form1_Load(object sender, EventArgs e)
          {
              score = 0;
              label1.Text = score.ToString();
          }
  
          private void buttonCheckGuess_Click(object sender, EventArgs e)
          {
              randomNumber = random.Next(0, 10);
  
              if (Convert.ToInt32(textboxGuess.Text) == randomNumber)
              {
                  MessageBox.Show("Your Guessed Correctly! The Number Is: " + textboxGuess.Text);
                  score += 10;
              }
              else if (Convert.ToInt32(textboxGuess.Text) &lt; randomNumber)
              {
                  MessageBox.Show("The Number Is Larger Than: " + textboxGuess.Text);
                  score -= 2;
              }
              else if (Convert.ToInt32(textboxGuess.Text) &gt; randomNumber)
              {
                  MessageBox.Show("The Number Is Smaller Than: " + textboxGuess.Text);
                  score -= 2;
              }
              else
              {
                  MessageBox.Show("Your Guessed Incorrectly. The Random Number Is Not: " + textboxGuess.Text);
              }
              label1.Text = score.ToString();
          }
  
          private void buttonScore_Click(object sender, EventArgs e)
          {
              MessageBox.Show("Your score is " + score);
          }
  
          private void listScore_SelectedIndexChanged(object sender, EventArgs e) { }
  
          private void label1_Click(object sender, EventArgs e) { }
      }
  }
  </code></pre>