textBox parsing in C#
<p>I have problem with parsing from textBox in C#. Basically I am trying to set some value to integer and after that when person type number in text box if it's the same to increase counter. But i must to parse int to string and here i am failing.</p>

<p>Here is the code:</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.Windows.Forms;
namespace kontrolno {
  public partial class Form1: Form {
    int counter;
    int A = 13;
    int B = 2116;
    public Form1() {
      InitializeComponent();
    }
    private void button1_Click(object sender, EventArgs e) {
      label3.Text = counter.ToString();
    }
    private void label3_Click(object sender, EventArgs e) {}
    private void groupBox1_Enter(object sender, EventArgs e) {}
    private void textBox1_TextChanged(object sender, EventArgs e) {
      int A = Int32.Parse(textBox1.Text);
      if (textBox1.Text = A) /*As you see somewhere here i have a problem*/
    }
    private void textBox2_TextChanged(object sender, EventArgs e) {
      /*Here must be parsed second textBox*/
    }
    private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) {
      switch (comboBox1.SelectedIndex) //comboBox 1st case
      {
      case 0:
        button1.Enabled = false;
        textBox1.Text = "13";
        textBox2.Text = "2116";
        radioButton1.Checked = true;
        checkBox1.Checked = true;
        /*Those 3 answers should 
        checkBox2.Checked = true;   be counted as one 
        checkBox4.Checked = true;  when mark is formed*/
        checkBox5.Checked = true;
        break;
      case 1:
        /*comboBox 2nd case*/
        button1.Enabled = true;
        textBox1.Text = "";
        textBox2.Text = "";
        radioButton1.Checked = false;
        checkBox1.Checked = false;
        checkBox2.Checked = false;
        checkBox4.Checked = false;
        checkBox5.Checked = false;
        break;
      }
    }
    private void radioButton1_CheckedChanged(object sender, EventArgs e) {
      if (radioButton1.Checked) {
        counter++;
      }
    }
    private void checkBox1_CheckedChanged(object sender, EventArgs e) {
      if (checkBox1.Checked) {
        counter++;
      }
    }
    private void checkBox2_CheckedChanged(object sender, EventArgs e) {
      if (checkBox2.Checked) {
        counter++;
      }
    }
    private void checkBox4_CheckedChanged(object sender, EventArgs e) {
      if (checkBox4.Checked) {
        counter++;
      } else {
        counter--;
      }
    }
    private void checkBox5_CheckedChanged(object sender, EventArgs e) {
      if (checkBox5.Checked) {
        counter++;
      } else {
        counter--;
      }
    }
  }
}
</code></pre>

<p>So i have problem but i don't know how to fix it.The idea of that code is to be test.The comboBox have 2 items in 1st item Practice user see all questions and answers.In 2nd item user filling up the answers and when press button he receive his mark.I haven't implemented yet formula for mark because can`t get result from textBox. </p>

<p>Also i want to ask is it possible to get 3 answers from checkBoxes to be counted as one?</p>

<p>It should be simple but i just crashed and can`t reslove that problem.</p>
