int x=120; char tdata=system.convert.tochar(x); SerialPort sp = new SerialPort("Com1", 19200, Parity.None, 8, StopBits.One); if (!sp.IsOpen) { sp.Open(); sp.Write(tdata); sp.BaseStream.Flush(); sp.Close(); }
but when x=129; //this is non printable characters
char
byte
Byte
Char
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)