title: Does Not Contain A Constructor That Takes 1 Arguments
body: <p>I am a bit new to C# and I recently ran into an issue receiving an "Invalid Operation Exception" when my serial connection is lost during a serial communication operation. I am trying to catch the error via <code>private void port_ErrorReceived</code> (see below) but I keep receiving an error stating "does not contain a constructor that takes 1 arguments".</p>
  
  <pre><code>    private void port_ErrorReceived(object sender, SerialErrorReceivedEventArgs e)
      {
          bool error = false;
  
          // Check if the comport is closed
          if (!comport.IsOpen)
          { 
                  try
                  {
                      // Try to open the port
                      comport.Open();
                  }
                  catch (UnauthorizedAccessException) { error = true; }
                  catch (IOException) { error = true; }
                  catch (ArgumentException) { error = true; }
                  catch (InvalidOperationException) { error = true; }
  
                  if (error) MessageBox.Show(this, "No serial port identified. Please check your connection.", "Serial Connection Lost", MessageBoxButtons.OK, MessageBoxIcon.Stop);
           }     
      }
  </code></pre>
  
  <p>Here is where I call my new event handler:</p>
  
  <pre><code>     comport.ErrorReceived += new SerialErrorReceivedEventArgs(port_ErrorReceived);
  </code></pre>
  
  <p>I've seen some similar posts on StackOverflow but I wasn't quite sure what applied to this scenario. Any help would be appreciated. Thank you.</p>