title: How to count the number of "correct" and "incorrect" responses
body: <p>I'm new to coding and am creating a windows form application in C#. I was having difficulties figuring out how to track the number of <code>correct</code> and <code>incorrect</code> responses. When a button is clicked, if the response is <code>correct</code> a label says correct. I want a different label to count the amount of times it says correct and incorrect. Here's what I was thinking but didn't work.</p>
  
  <pre><code>int add = 0;
  add = int.Parse(correct.Text);
  
  if (label1.Text == "Correct")
  {
      correct.Text = add++;
  }
  else
      incorrect.text = add++;
  </code></pre>
  
  <p><code>correct</code> and <code>incorrect</code> are names of my label.</p>
  
  <p>Here's my button click event, there are many alike.</p>
  
  <pre><code>private void G_Click(object sender, EventArgs e)
          {
              if (go.Visible == true)
              {
                  go.Visible = false;
                  Random rnd = new Random();
                  int y = rnd.Next(1, 7);
  
                  if (y == 1)
                  {
                      eo.Visible = true;
                  }
                  if (y == 2)
                  {
                      ao.Visible = true;
                  }
                  if (y == 4)
                  {
                      dd.Visible = true;
                  }
                  if (y == 5)
                  {
                      go.Visible = true;
                  }
                  if (y == 6)
                  {
                      eeo.Visible = true;
                  }
  
                  timer1.Start();
  
                  label1.Text = "Correct";
              }
              else
               {
                  label1.Text = "Incorrect";
               }
  
              private int correctCount = 0;
              private int incorrectCount = 0;
  
  
               if (label1.Text = "Correct";)
                  {
                       correctCount++;
                       correct.Text = correctCount.ToString();
                  }
      else
                  {
                        incorrectCount++;
                        incorrect.Text = incorrectCount.ToString();
                  }
  </code></pre>