title: There is no argument given that corresponds to the required formal parameter 'sender'
body: <p>I got this method here:</p>
  
  <pre><code> public void textBoxValid(object sender, CancelEventArgs e)
  {
      string error = null;
      string pattern = @"\,\";
      if(Regex.IsMatch(priceTextBox.Text, pattern))
      {
          error = "Please use [.] instead of [,]";
          e.Cancel = true;
      }
      errorProvider1.SetError((Control) sender, error);
  }
  </code></pre>
  
  <p>And when I'm calling it here:</p>
  
  <pre><code> private void enterButton_Click(object sender, EventArgs e)
  {
      textBoxValid();
      //Write all data to a file.
      using (StreamWriter sw = new StreamWriter(@"c:\event.txt", true))
      {
          sw.WriteLine(priceTextBox.Text + "," + eventTextBox.Text + "," + descriptionTextBox.Text + ","
          + DateTimePicker.Value + "," + DayUpDown.Value);           
      }
      clearTextBoxes();                      
  }
  </code></pre>
  
  <p>I'm getting an error saying:</p>
  
  <blockquote>
    <p>There is no argument given that corresponds to the required formal
    parameter 'sender' of 'WriteEventForm.textBoxValid(object,
    CancelEventArg)'</p>
  </blockquote>
  
  <p>Could one of you, fine people, point out what am I doing wrong?
  Thank you.</p>