public virtual void Dispose() { if (_port != null) _port.Dispose(); // release the serial port if applicable }