title: C# Checking if button was clicked
body: <p>I am making a program that should just continue if 2 conditions are given. </p>
  
  <p>The first one, 2 <code>TextBox</code>s have the same word in and a <code>Button</code> was clicked, which opens a new <code>Form</code>. Now I have the event for the "complete" button.</p>
  
  <pre><code>private void button2_Click(object sender, EventArgs e)
  {
      if (textBox2.Text == textBox3.Text &amp;&amp; ???) 
      {    
          StreamWriter myWriter = File.CreateText(@"c:\Program Files\text.txt");
          myWriter.WriteLine(textBox1.Text);
          myWriter.WriteLine(textBox2.Text);
       }
  ]
  </code></pre>
  
  <p>My problem is, I can't find a method that gives something like `button1.Clicked or something similar.</p>
  
  <p>I hope someone can help me here..</p>