How do I use dataReceived event of the SerialPort Port Object in C#?

后端 未结 7 1740
無奈伤痛
無奈伤痛 2020-11-28 07:26

I am attempting to create a small application to collect data received from an external sensor attached to COM10. I have successfully created a small C# console object and

7条回答
  •  失恋的感觉
    2020-11-28 07:39

    Might very well be the Console.ReadLine blocking your callback's Console.Writeline, in fact. The sample on MSDN looks ALMOST identical, except they use ReadKey (which doesn't lock the console).

提交回复
热议问题