serial port - serialport.write() in c# is working when debugging but not when debug point is removed and run -
i'm working on project in i'm writing "y" , "n" signals serial port, working fine when debug when break point removed , run, it's not writing "y" or "n" signals. strange problem. appreciated.
note:i using visual studio 2010,windows forms c#
code:
if(balance>25) serialport.write("y"); else serialport.write("n");
when using serial ports, have close or flush stream. when debug see values inside stream, when run if haven't close or flush stream not write.
just try close or flush stream
Comments
Post a Comment