title: How to add dictionary int values to existing int variables
body: <p>In my program, I have some code that saves the player's records to a text file by organizing the data into a dictionary and on another play session, if the player wanted to load their pre existing data, they would type their name into the textbox, and if there is a set of data that matches the name, it would load the data back in.</p>
  <p>The issue I have is that I am not sure if the code I currently have works. It says there are no errors, but I would like to check with people that have more experience to make sure I have the right set up. I have included both the file writer and the file reader methods below in case anybody wanted to see the file writer method.</p>
  <pre><code>private void FileWriter(string playername, int playerwins, int computerwins, int ties)
  {
      var records = new Dictionary&lt;string, (int playerwins, int computerwins, int ties)&gt;
      {
          {playername, (playerwins, computerwins, ties)}
      };
      StreamWriter inputfile;
      inputfile = File.AppendText(&quot;Records.txt&quot;);
      inputfile.WriteLine(records);
      inputfile.Close();
  }
  
  private void FileReader(string playername, int playerwins, int computerwins, int ties, IEnumerable&lt;KeyValuePair&lt;string, (int, int, int)&gt;&gt; records)
  {
      StreamReader outputfile;
      outputfile = File.OpenText(&quot;Records.txt&quot;);
      while (!outputfile.EndOfStream)
      {
          foreach(KeyValuePair&lt;string, (int, int, int)&gt; res in records)
          {
              if (playername == res.Key)
              {
                  playerwins +=playerwins;
                  computerwins += computerwins;
                  ties += ties;
              }
          }
      }
  }
  </code></pre>