I have a Rs232 connection. Data Rx is working fine. However when I try to purposely send bad data the Case Else branch does not pick it up. The A, B,C branches work fine. If I send lets say an "F" it goes right through to past the Else?????
moRS232.Read(Int32.Parse(txtBytes2Read.Text))
Select Case moRS232.InputStreamString()
Case "A"
txtTx.Text = "Byte 1"
Case "B"
txtTx.Text = "Byte 2"
Case "C"
txtTx.Text = "Byte 3"
Case Else
txtRx.BackColor = Color.Red
txtRx.ForeColor = Color.White
txtRx.Text = "Error occurred!"
End Select
txtRx.Text = moRS232.InputStreamString()
moRS232.Read(Int32.Parse(txtBytes2Read.Text))
Select Case moRS232.InputStreamString()
Case "A"
txtTx.Text = "Byte 1"
Case "B"
txtTx.Text = "Byte 2"
Case "C"
txtTx.Text = "Byte 3"
Case Else
txtRx.BackColor = Color.Red
txtRx.ForeColor = Color.White
txtRx.Text = "Error occurred!"
End Select
txtRx.Text = moRS232.InputStreamString()