byte[] byte_buffer = new byte[20]; private void serialPort1_DataReceived(objectsender,System.IO.Ports.SerialDataReceivedEventArgs e) { int bytes = serialPort1.BytesToRead; serialPort1.Read(byte_buffer, 0, bytes); count++; if (byte_buffer[0] == startup) { this. Close();//Error Application. Run(new Form4()); } }
MSDN
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)