private void VerifySerialPort(SerialPort serialPort) { if(_serialPort == null) { const string message = "Connection to the Arduino device has not be initialized."; throw new IOException(message); } }