c# - Error The Write timed out -


can tell me wrong code? code in c#... gives me error "the write timed out", set writetimeout...

i want write data serial port. use .net framework 3.5

} serialport sp = new serialport("com6", 9600, system.io.por­ts.parity.none, 8,    system.io.por­ts.stopbits.o­ne);  sp.writetimeout = 500; sp.open();   try { sp.write("hello"); } catch (timeoutexception) { console.write­line("error"); }  sp.close();  console.readkey(); } 

thanks


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -