Can anyone tell me why serialport.read (combuffer, 0, bytes)?
whereby
whereby
Code:
void comPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
//retrieve number of bytes in the buffer
int bytes = comPort.BytesToRead;
//create a byte array to hold the awaiting data
byte[] comBuffer = new byte[bytes];
//read the data and store it
comPort.Read(comBuffer, 0, bytes);
//display the data to the user
DisplayData(MessageType.Incoming, ByteToHex(comBuffer) + "\n");
Comment