ArduinoTest.Components.ArduinoConnection.VerifySerialPort C# (CSharp) Method

VerifySerialPort() private method

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